static byte[] gzipString(S s) ctex { new ByteArrayOutputStream baos; GZIPOutputStream gos = new GZIPOutputStream(baos); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(gos, "UTF-8"); PrintWriter printWriter = new PrintWriter(outputStreamWriter); printWriter.print(s); printWriter.close(); gos.close(); ret baos.toByteArray(); }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006276 |
Snippet name: | gzipString |
Eternal ID of this version: | #1006276/1 |
Text MD5: | f45c4d529a818dc845f861e568f761f8 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-26 14:22:13 |
Source code size: | 367 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 569 / 555 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1008630 - gzippedSize - gzipped byte size of a UTF-8 string, byte array or file #1011183 - gzipBytes - gzip a byte array #1020478 - bzipString - bzip2-compress an UTF8-encoded string |