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

15
LINES

< > BotCompany Repo | #1000679 // gunzipToText - unoptimized

JavaX fragment (include)

sS gunzipToText(S dataID) {
  ret gunzipToText(loadBinarySnippet(dataID));
}

sS gunzipToText(File f) ctex {
  new ByteArrayOutputStream baos;
  copyStreamAndCloseAll(newGZIPInputStream(f), baos);
  ret fromUtf8(baos.toByteArray());
}

sS gunzipToText(byte[] data) ctex {
  new ByteArrayOutputStream baos;
  copyStreamAndCloseAll(newGZIPInputStream(new ByteArrayInputStream(data)), baos);
  ret fromUtf8(baos.toByteArray());
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1000679
Snippet name: gunzipToText - unoptimized
Eternal ID of this version: #1000679/8
Text MD5: 1e531594e18d7f43e59bdd5a5b15d55b
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-09 22:40:21
Source code size: 440 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 671 / 1057
Version history: 7 change(s)
Referenced in: #1001261 - gunzipBinaryData
#1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1033067 - gunzipBytes
#1035983 - bunzipToText - unoptimized
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)