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

13
LINES

< > BotCompany Repo | #1028483 // uncompressLineCompedSingle

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

Libraryless. Click here for Pure Java version (2540L/16K).

static <A> S uncompressLineCompedSingle(LineCompedSingle<A> lc) {
  new StringBuilder buf;
  uncompressLineCompedSingle_step(lc, buf, lc.main);
  ret str(buf);
}
  
svoid <A> uncompressLineCompedSingle_step(LineCompedSingle<A> lc, StringBuilder buf, L<Int> chunks) {
  for (int idx : chunks)
    if (idx < l(lc.literals))
      buf.append(lc.literals.get(idx));
    else
      uncompressLineCompedSingle_step(lc, buf, intPairToList(lc.pairs.get(idx-l(lc.literals))));
}

Author comment

Began life as a copy of #1028482

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1028483
Snippet name: uncompressLineCompedSingle
Eternal ID of this version: #1028483/5
Text MD5: 7a8a3319231a976f615677d265781d34
Transpilation MD5: 36db9e124bd74c9fcc9e4bb4afa7e31f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-07 23:47:31
Source code size: 481 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 127 / 213
Version history: 4 change(s)
Referenced in: [show references]