roadroller  by lifthrasiir

JS packer for large demos, targeting js13kGames

created 4 years ago
342 stars

Top 81.9% on sourcepulse

GitHubView on GitHub
Project Summary

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

Highlighted Details

  • Achieves up to 15% better compression than ZIP/gzip.
  • Supports custom input types (JS, Text) and actions (eval, write to document).
  • Configurable compression parameters for time/memory trade-offs.
  • Output is ES6 compatible, running in modern browsers and JS environments.

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.

Health Check
Last commit

3 years ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 90 days

Explore Similar Projects

Starred by Simon Willison Simon Willison(Author of Django), Jared Palmer Jared Palmer(Ex-VP of AI at Vercel; Founder of Turborepo; Author of Formik, TSDX), and
1 more.

GPT-3-Encoder by latitudegames

0%
719
JS library for GPT-2/GPT-3 text tokenization
created 4 years ago
updated 2 years ago
Feedback? Help us improve.