Libraryless. Click here for Pure Java version (14698L/87K).
1 | svoid aic_testSkipSameSizeShorteningsParam() { |
2 | new AICDemo demo; |
3 | //demo.inputText("xx a xx b c xx b a xx xx a a"); |
4 | //demo.inputText("xx xx xx xx"); |
5 | //print(demo.inputText); |
6 | new L<LPairS> tokenByToken; |
7 | for (param : ll(false, true)) { |
8 | demo.adapt = aic -> aic.skipSameSizeShortenings(param); |
9 | int l = l(demo.compress()); |
10 | tokenByToken.add(demo.tokenByToken); |
11 | printVars(+param, +l, escapeWordsUsed := demo.aicComp.escapeWordsUsed); |
12 | demo.decompress(); |
13 | assertTrue(demo.decompressedOK); |
14 | } |
15 | int nTok = l(first(tokenByToken)); |
16 | for i to nTok: { |
17 | var p1 = first(tokenByToken).get(i); |
18 | var p2 = second(tokenByToken).get(i); |
19 | //if (!eq(p1, p2)) |
20 | if (l(p1.b) != l(p2.b)) |
21 | printVars(+i, +p1, +p2); |
22 | } |
23 | } |
Began life as a copy of #1016056
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034373 |
Snippet name: | aic_testSkipSameSizeShorteningsParam |
Eternal ID of this version: | #1034373/1 |
Text MD5: | 696b85b8e7c14afd8584b6de59cd3428 |
Transpilation MD5: | be35fbaa49c07dea3b54dc4bbbf03871 |
Author: | stefan |
Category: | javax / compressing text |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-02-03 12:03:16 |
Source code size: | 766 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 173 / 239 |
Referenced in: | [show references] |