Uses 578K of libraries. Click here for Pure Java version (4580L/26K).
1 | !include once #1024944 // Apache Commons Compress |
2 | |
3 | svoid text2zip_apache(ZipArchiveOutputStream outZip, S name, S text) ctex { |
4 | if (text == null) ret; |
5 | byte[] utf8 = toUtf8(text); |
6 | ZipArchiveEntry e = new(name); |
7 | e.setSize(l(utf8)); |
8 | outZip.putArchiveEntry(e); |
9 | outZip.write(utf8, 0, l(utf8)); |
10 | } |
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: | 134 / 189 |
Version history: | 1 change(s) |
Referenced in: | [show references] |