ZLib port for JavaScript, compiled to Luau (supporting roblox-ts)
Find a file
2014-02-18 21:55:32 +04:00
benchmark Added level param to benchmarks 2014-02-18 04:32:01 +04:00
lib cleared unnecessary var casts 2014-02-18 07:03:13 +04:00
test Enabled more tests 2014-02-18 03:10:33 +04:00
.gitignore Added Makefile + doc/test skeletons 2014-02-03 17:13:09 +04:00
.jshintignore implement deflate store + high level deflate implementation + lint fixes 2014-02-13 14:55:24 -02:00
.jshintrc implement deflate store + high level deflate implementation + lint fixes 2014-02-13 14:55:24 -02:00
.ndocrc Added Makefile + doc/test skeletons 2014-02-03 17:13:09 +04:00
.npmignore Added benchmark 2014-02-03 16:24:19 +04:00
.travis.yml Added travis-ci config 2014-02-03 23:03:05 +04:00
index.js Added package main file 2014-02-03 22:56:46 +04:00
LICENSE readme & license 2014-02-18 21:55:32 +04:00
Makefile Added travis-ci config 2014-02-03 23:03:05 +04:00
package.json Added travis-ci config 2014-02-03 23:03:05 +04:00
README.md readme & license 2014-02-18 21:55:32 +04:00

pako

Build Status

zlib port to javascript. Very fast!

Why pako is cool:

  • Almost as fast im modern browsers as C implementation (see benchmarks)
  • Works in browser
  • Modular - you can browserify any separate component
  • Both Sync & streamable interfaces (streamable is for big blobs)
  • It's fresh - ports the latest zlib version (now 1.2.8)
  • Tested - result is binary equal to zlib's one
  • No restrictions - MIT licence

Benchmarks:

node v0.11, 10mb sample:

   deflate-gildas x 2.82 ops/sec ±1.21% (11 runs sampled)
   deflate-imaya x 2.25 ops/sec ±0.59% (9 runs sampled)
 ! deflate-pako x 6.09 ops/sec ±0.98% (19 runs sampled)
   deflate-zlib x 9.13 ops/sec ±0.92% (46 runs sampled)

node v0.11, 10mb sample:

   deflate-gildas x 3.39 ops/sec ±6.58% (12 runs sampled)
   deflate-imaya x 2.14 ops/sec ±4.29% (9 runs sampled)
 ! deflate-pako x 6.61 ops/sec ±0.66% (20 runs sampled)
   deflate-zlib x 9.28 ops/sec ±1.98% (47 runs sampled)

API

TBD

Notes

Since pako was done mostly for browser, some specific functions were left unported.

deflate:

  • writing custom gzip headers (default is ok)
  • deflateSetDictionary, deflateParams, deflateSetHeader, deflateBound, deflatePending

inflate:

TBD

We will probably provide more modular design, to keep significant part of code reasonably small.

Authors

Special thanks to Vyacheslav Egorov (@mraleph) for his awesome tutoruals about optimising code for v8, IRHydra tool and personal advices.

License

MIT