Skip to content
Siorki edited this page Oct 27, 2018 · 4 revisions

RegPack history

RegPack was created after js1k 2012 with the intent to improve compression over jsCrush and First Crush. The use of a regular expression to describe the tokens was inspired by p01's original work.

New features were introduced in each version to improve compression. The diagram below represents, for each module, the version that first saw it.

Modules by version


v1

  • 1.0, Mar. 2013

RegPack v1

The initial version of RegPack only contains the Crusher and the algorithm that builds the regular expression from the token list.


v2

  • 2.0, Apr. 2013

RegPack v2

The algorithm was completed in the second version to use negated character classes in the regular expression and pick the best of the two.


v3

  • 3.0, Feb. 2014
  • 3.0.1, Mar. 2014
  • 3.0.2, Feb. 2015

RegPack v3

The third version introduces preprocessing with the ability to rename variables to give extra tokens to the crusher, and create aliases for context method names only. It does not operate on properties yet.


v4

  • 4.0, Dec. 2015
  • 4.0.1, Feb. 2016

RegPack v4

The fourth version runs with both Node.js and inside a browser. With the latter, patterns used by the crusher are shown on the input code.

It also elaborates on preprocessing : Aliasing can also be performed on context properties, and another module merges the evaluation of the unpacked string and its main loop.


v5

  • 5.0.0, Feb. 2017
  • 5.0.1, Feb. 2017
  • 5.0.2, Oct. 2017

RegPack v5

The fifth revision brings support for ES6 (arrow function, for..of loop, tagged template literals), a [module](Module - quote strings) that optimizes the choice of string quotes, and the thermal view in browser environment.

Clone this wiki locally