Uses 12245K of libraries. Click here for Pure Java version (8507L/44K).
!7 cprint { start-thread { S rule = "revealing secret opening preparation => he reveals his secret opening preparation"; LS sides = splitAtDoubleArrow(rule); SS data = listToMapWithKeyMaker(sides, i -> str(i+1)); new LineCompCompressor comp; comp.byteMode = true; comp.loadTexts(data); comp.run(); //print(comp.asText()); lcPrintSubstrings(comp); // find pairs appearing on both sides //print(multiSetDuplicates(multiSetMapToMultiSet(lcPairsToFiles(comp))); print("top-level encodings", values(comp.finalEncodings)); print("expanded encodings", mapValuesToList(comp.finalEncodings, l -> join("|", map(l, i -> comp.itemToString(i))))); // simpler version: just take items appearing in both top-level encodings LL<Int> encodings = valuesList(comp.finalEncodings); Set<Int> inBoth = intersectSets(asLinkedHashSet(first(encodings)), second(encodings)); print(+inBoth); print("renumbered", lcRenumberTopLevelEncodings(comp)); print("simplified & renumbered", lcRenumberTopLevelEncodings(lcRenumberTopLevelEncodings_simplify(comp.finalEncodings)); } }
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: | #1028767 |
Snippet name: | ByteComp experimentation |
Eternal ID of this version: | #1028767/9 |
Text MD5: | 5cea303fc153c65eea9caa1436409553 |
Transpilation MD5: | 46fc4da76debe83b9235f05a3f44fe18 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-08 01:25:37 |
Source code size: | 1201 bytes / 33 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 238 / 484 |
Version history: | 8 change(s) |
Referenced in: | [show references] |