Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1001173 // zip2zip

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (4679L/26K).

svoid zip2zip(File inZip, ZipOutputStream outZip) ctex {
  temp ZipFile zipFile = new(inZip);
  for (e : enumerationToIterator(zipFile.entries())) {
    print("Copying " + e.getName());
    ZipEntry e2 = new(e.getName());
    e2.setSize(e.getSize());
    outZip.putNextEntry(e2);
    copyStreamAndCloseInput(zipFile.getInputStream(e), outZip);
  }
}
  
svoid zip2zip(File inZip, ZipOutputStream outZip, IPred<S> predicate) {
  zip2zip_withPredicate(inZip, outZip, predicate);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001173
Snippet name: zip2zip
Eternal ID of this version: #1001173/10
Text MD5: 12845396ea7bb2fcaa5bdf51dab765f2
Transpilation MD5: f2db717420e0842be348ba1febf40013
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-29 06:34:04
Source code size: 490 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 651 / 915
Version history: 9 change(s)
Referenced in: #1001335 - zip2dir
#1002029 - listZipFile
#1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1011503 - zip2zip_exceptManifest - excludes all META-INF/
#1024945 - zip2tar
#1024957 - zip2zip_withPredicate
#1033493 - zip2zip_stored
#1033498 - Zip2Zip
#3000382 - Answer for ferdie (>> t = 1, f = 0)