3 ms·
I love these tiny decoders, even if their use cases are limited. To me this is as much art as it is programming. For Javascript I ran into these two recently:
by jansan 4y ago
I love these tiny decoders, even if their use cases are limited. To me this is as much art as it is programming.
For Javascript I ran into these two recently:
Tiny LZW(ish) encoder/decoder. The decoder is 141 bytes: https://gist.github.com/mr5z/d3b653ae9b82bb8c4c2501a06f3931c6 https://gist.github.com/mr5z/d3b653ae9b82bb8c4c2501a06f3931c...
RegPack, a non-standard encoding, but an awesome approach for small chunks (1-4KByte is optimal) of self contained compressed code, using regular expressions for decoding: https://github.com/Siorki/RegPack https://github.com/Siorki/RegPack
- lifthrasiir 4y agoCrinkler [1] is a popular compressor-linker for 1--8 KB demos and its decompressor (partially overlapping with a PE header) is probably around 1--200 bytes. Later efforts like oneKpaq [2] also have a comparable decompressor size. If you don't mind a shameless plug and a slightly larger decompressor (about 500 bytes in JS) for better compression, my Roadroller [3] might fit the bill as well. [1] https://github.com/runestubbe/Crinkler https://github.com/runestubbe/Crinkler [2] https://github.com/temisu/oneKpaq https://github.com/temisu/oneKpaq [3] https://lifthrasiir.github.io/roadroller/ https://lifthrasiir.github.io/roadroller/