Skip to content

Releases: lifthrasiir/roadroller

v2.1.0

13 Sep 00:22
Compare
Choose a tag to compare

Compression improvements:

  • The compressor now uses a specialized WebAssembly implementation by default. (c2bd435, d9a3897)
  • Cache the result of JavaScript code transformation during the optimization. Combined with the WebAssembly implementation, the optimization is up to 2.5 times faster than 2.0.0. (02d09a3)
  • Removed a special result by the optimizer for turning JS inputs into texts and made the equivalent a separate option (-Zdy). This also allows for using JS-specific modelling for texts if beneficial, and avoids the UI confusion present in the online demo. (4dd5fe7)
  • The rANS state is now embedded directly into the compressed data. (48ace3d)
  • The decoder is now slightly smaller. (819a574, eb74630, c6a88ee)
  • Tools no longer generate a newline between the first and second "lines". (eb06edd)

UI/API improvements:

  • -OO option is added to the CLI, which runs a series of optimizations forever until a user request. The optimization now proceeds using the best parameters so far when the user has aborted the search with Ctrl-C even in other optimization levels. (974a9ee)
  • Renamed ArrayBufferPool to ResourcePool to allow using it for other uses (e.g. WebAssembly modules). Also made it clear that ResourcePool.allocate should not be used outside of Roadroller. (3f073cf)
  • Packer now creates its own ResourcePool if not given, so Packer.optimize is now equally fast with or without the pool. (2c727ea)
  • The online demo deallocates the pool a minute after the last compression. (5e86a59)
  • compressWithDefaultModel has been added as a shortcut (and optimized version) for compressWithModel with DefaultModel. (1a644e9)

Bugfixes:

  • Fixed a typo in index.d.ts. (3f073cf)

Deprecations:

  • ArrayBufferPool and arrayBufferPool fields are now deprecated in favor of ResourcePool and resourcePool. (3f073cf)
  • OptimizedPackerOptions.preferTextOverJS is no longer used and thus deprecated. (4dd5fe7)

2.0.0: I-did-not-expect-to-bump-the-major-version-this-early edition

27 Aug 18:35
Compare
Choose a tag to compare

Breaking Changes:

  • The first line and second line are no longer guaranteed to be separate statements. In particular the documentation accidentally suggested that two lines can be (but are not recommended to be) in separate files, necessitating a breaking change.
  • DirectContextModelOptions.modelRecipBaseCount is now required. The value of 2 is identical to the 1.x behavior.
  • Deprecated APIs have been removed.
    • OptimizerProgressInfo.temperature: Use ratio instead.
    • optimizeSparseSelectors function and Packer.optimizeSparseSelectors method: Use Packer.optimize instad.
    • PackerOptions.learningRateNum/Denom: Use PackerOptions.recipLearningRate instead.

Compression improvements:

  • Added a new tunable modelRecipBaseCount parameter (-Zmd in the CLI) with a new default, allowing ~3% additional improvements. (4e8041c, 2071861, 717f7ee)
  • The decoder is now slightly smaller. (9cf1845)

UI/API improvements:

  • #14: -O1 is now a quick search that only takes ~10s for typical inputs. The old -O1 is renamed to -O2. (df5c8ed)
  • The CLI now defaults to -O1 if no optimizable arguments are given. Use -O0 to explicitly disable the optimization. (a610f68)
  • The estimated compressed size is now more accurate. (8732d3d)
  • The online demo is now slightly more mobile friendly. (10b0bbe)

Bugfixes:

  • #7: The output no longer pollutes the global scope by default. New allowFreeVars option (-D in the CLI) can be used to allow the decoder to be "dirty". (70fae12, ecd8116)
  • #15: The optimizer now works in Node.js 14. It is still strongly recommended to use Node.js 16 because 14 is significantly slower. (13d9c8d)
  • Fixed a bug where -Zco -M (but not -M -Zco) was incorrectly allowed in the CLI. (ecd8116)
  • Packed.freeVars was missing one variable. (740f2b5)

v1.2.1

23 Aug 15:38
Compare
Choose a tag to compare

Compression improvements:

  • The context model is now up to 3 times faster than before. This massively improves the optimization performance especially in Firefox. (8af149c)

UI/API improvements:

  • Now can be used (not exactly "supported", though) with Node.js 14. (d9270c6)
  • The internal API now supports several tools that are necessary to use Roadroller as a general purpose compression library:
    • The preset dictionary can be used now. (3bf7845)
    • The number of output codes no longer has to be a power of 2; the negative number to outBits now denotes the exact code count. (ecb84a3)
    • The decompressor can be configured so that it ends at the known final byte instead of the known input length. (d8146d9)

Bugfixes:

  • Fixed the broken JS parser in the online demo. (2bca32c)
  • While very unlikely to affect anyone, all uses of Math.log2 have been replaced with the exact function. (b29d365)

v1.2.0

22 Aug 21:27
Compare
Choose a tag to compare

Compression improvements:

  • Default parameters have been meticulously tuned for typical JS code inputs. Up to 5% additional gain in compression has been observed. (2c7a59a)
  • The optimizer is now able to optimize most internal parameters. (ec7ae89, e1d1f1b)
  • The decoder is made slightly smaller when compressed. (c06c510, 5ca4907)

UI/API improvements:

  • The optimization now reports more detailed progress. (86bd800)
  • The estimated DEFLATE size now refers to the combined stream size and thus is more accurate. (f7bf1a4)
  • An object returned by Packer.makeDecoder() (Packed) now includes estimateLength method. (bbabf90)
  • CLI now supports -v, -vv etc. (b2b422d)
  • CLI and online demo now supports advanced configurations via -Z... options. The full list of such options is available with -h -v. (9545733)
  • The number of contexts can be now configured in the online demo. (5e2d779)
  • CLI now avoids printing backtrace for known classes of errors. (2f6fb1e)
  • Roadroller can be now imported as a CommonJS module. (a097203689d3960d104bdb764c9f97ecd8487507)

Bugfixes:

  • Fixed a bug where -O1 tried to optimize (and print) parameters, but its compressed output was not using those parameters. (e67e50e, e5fa608)
  • Fixed a edge case that the data cannot be decompressed if modelMaxCount is 127 or 32767 and an input is long enough that the number is reached. (b22c32c)
  • CLI no longer accepts options like --optimize1 without an in-between =. (04ecffa)

Deprecations:

  • Packer.optimizeSparseSelectors is deprecated in favor of more powerful Packer.optimize. (86bd800)
  • PackerOptions.learningRateNum/Denom is deprecated in favor of a combined PackerOptions.recipLearningRate. (e78919e)

v1.1.0

20 Aug 02:48
Compare
Choose a tag to compare

Compression improvements:

  • Re-enabled quote modelling which was there but accidentally got disabled. (19b15aa)
  • -O1 tries to use the text type for the JS input if it's worthy. (b99f7e0)
  • Escaped quotes in string, template (except for the interpolated code) and RegExp literals no longer make the compression worse. (a76330e)
  • The memory usage is reduced by 40% in the typical settings (precision=16, modelMaxCount=63). (9b1082e)
  • The compressor is generally slightly faster due to the model interface change.

UI/API improvements:

  • CLI now supports -q/--silent option. (257a31d)
  • -O1 now prints the exact options to replicate the optimization result. (b99f7e0)
  • defaultSparseSelectors now accepts the optional number of contexts. (1cb8542)

Bugfixes:

  • Fixed an invalid code when exactly 1--2, 10 or 33+ abbreviations are in use. (3f60e44, 690c8f3)
  • Both the compressor and compact decoder now correctly handles more than 64 KB of inputs. (df2f67f, 3299ba3, e459377)
  • The compressor no longer fails on very low entropy inputs. (06aad8a)
  • Sparse selectors larger than 511 (corresponding to 10th order and beyond) now generate a correct (but less compact) code. (052faef)
  • -S no longer fails with explicit separators. (e73ecce)
  • -a no longer fails when combined with -t. (aab7794)