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

10
LINES

< > BotCompany Repo | #1033784 // text2zip_apache

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

Uses 578K of libraries. Click here for Pure Java version (4580L/26K).

!include once #1024944 // Apache Commons Compress

svoid text2zip_apache(ZipArchiveOutputStream outZip, S name, S text) ctex {
  if (text == null) ret;
  byte[] utf8 = toUtf8(text);
  ZipArchiveEntry e = new(name);
  e.setSize(l(utf8));
  outZip.putArchiveEntry(e);
  outZip.write(utf8, 0, l(utf8));
}

Author comment

Began life as a copy of #1006539

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033784
Snippet name: text2zip_apache
Eternal ID of this version: #1033784/2
Text MD5: 294dcae14b9ad41a31593574e4368bb0
Transpilation MD5: 9619214cf91e6b6763bb14c84597726b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-04 19:35:40
Source code size: 310 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 69 / 109
Version history: 1 change(s)
Referenced in: [show references]