Libraryless. Click here for Pure Java version (13598L/81K).
svoid aicDemo(S snippetID default #1034022) { new AdaptiveIdentifierCompression aic; aic.minCountToCompress(1); S text = loadSnippet_cached(snippetID); LS tok = map(javaTok(text), t -> aic.encode(t)); S text2 = join(tok); showText(text2); print(nChars(text) + " => " + nChars(text2) + " = " + doubleRatio(l(text2), l(text))); }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034371 |
Snippet name: | aicDemo - AdaptiveIdentifierCompression |
Eternal ID of this version: | #1034371/1 |
Text MD5: | 80eb6f451fa7f168e72f52714cc63861 |
Transpilation MD5: | 687fceb0b12c9ac7ee43c1f42fe1b6a6 |
Author: | stefan |
Category: | javax / gazelle 22 |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-02-03 10:35:31 |
Source code size: | 349 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 131 / 205 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1034372 - AICDemo - AdaptiveIdentifierCompression |