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

10
LINES

< > BotCompany Repo | #1006276 // gzipString

JavaX fragment (include)

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: 567 / 553
Referenced in: [show references]