JS packer for large demos, targeting js13kGames
Top 81.9% on sourcepulse
Roadroller is a heavyweight JavaScript packer designed to significantly reduce the size of large JavaScript demos, offering up to 15% better compression than standard ZIP/gzip recompressors. It is suitable for projects ranging from 4KB to larger demos, targeting developers who need maximum code size reduction.
How It Works
Roadroller employs advanced data compression techniques, including a Bytewise rANS coder and logistic context mixing, a type of neural network for data compression. It utilizes sparse context models up to 9th order, with models tuned per input using simulated annealing. This approach allows for highly specialized compression, particularly effective on minified JavaScript code.
Quick Start & Requirements
npx roadroller input.js -o output.js
Highlighted Details
Maintenance & Community
The project is maintained by lifthrasiir. Further community or roadmap details are not explicitly provided in the README.
Licensing & Compatibility
The Roadroller compressor is licensed under the MIT license. The generated decoder code is placed in the public domain. This allows for commercial use and integration into closed-source projects.
Limitations & Caveats
Roadroller is resource-intensive, requiring significant memory and runtime. It is weaker than DEFLATE at exploiting long-distance duplication. Compatibility with MSIE requires transpilation, and potential minor behavioral differences exist due to Math.exp
/Math.log
approximations across different JS engines, though this is generally not an issue for common engines.
3 years ago
1 day