Porting Zopfli to JavaScript with Emscripten.
Use one in "bin" directory.
- zopfli.min.js: Deflate + Zlib + Gzip
- zopfli.raw.min.js: Deflate
- zopfli.zlib.min.js: Zlib
- zopfli.gzip.min.js: Gzip
/** @type {(Array.<number>|Uint8Array)} */
var plain = [1, 2, 3, 4];
/** @type {Zopfli.Deflate} */
var compressor = new Zopfli.RawDeflate(plain);
/** @type {Uint8Array} */
var compressed = compressor.compress();
/** @type {(Array.<number>|Uint8Array)} */
var plain = [1, 2, 3, 4];
/** @type {Zopfli.Deflate} */
var compressor = new Zopfli.Deflate(plain);
/** @type {Uint8Array} */
var compressed = compressor.compress();
/** @type {(Array.<number>|Uint8Array)} */
var plain = [1, 2, 3, 4];
/** @type {Zopfli.Deflate} */
var compressor = new Zopfli.Gzip(plain);
/** @type {Uint8Array} */
var compressed = compressor.compress();
Second argument of constructor functions.
{
'iterations': number // Zopfli iterations parameter (Default: 15)
}
- Ant 1.8+
- JRE 1.6+
- Emscripten's Dependencies
Use "ant" command.
$ ant [target]
target | generate file | implementation |
---|---|---|
debug | zopfli.debug.min.js | - |
plain | zopfli.plain.min.js | - |
deflate | zopfli.raw.min.js | Raw Deflate |
zlib | zopfli.zlib.min.js | ZLIB Deflate |
gzip | zopfli.gzip.min.js | GZIP |
all | * | default target |
Apache License 2.0