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: 648 / 910
Version history: 9 change(s)
Referenced in: [show references]