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

15
LINES

< > BotCompany Repo | #1028258 // lineComp_compressTextAsChars

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

Transpiled version (7545L) is out of date.

static LineCompedSingle<Char> lineComp_compressTextAsChars(LineCompCompressor compressor default new LineCompCompressor, S text) {
  SS data = litmap("" := lines_rtrim(lambdaMap charToHex(characters(text))));
  compressor.loadTexts(data);
  compressor.verify = true;
  compressor.run();
  
  new L<Char> literals;
  new L<IntPair> pairs;
  for (LineCompCompressor.Chunk c : compressor.chunks)
    if (c cast LineCompCompressor.CPair)
      pairs.add(IntPair(c.i1, c.i2));
    else
      literals.add(charFromHex(((LineCompCompressor.CPrim) c).s));
  ret new LineCompedSingle<Char>(literals, pairs, firstValue(compressor.finalEncodings));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028258
Snippet name: lineComp_compressTextAsChars
Eternal ID of this version: #1028258/14
Text MD5: daad18236abc9aab69142b8f4662dce1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-08 00:03:53
Source code size: 653 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 277 / 424
Version history: 13 change(s)
Referenced in: [show references]