pako

Haxe externs for the pako js library (https://github.com/nodeca/pako)
https://github.com/FuzzyWuzzie/haxe-pako

To install, run:

haxelib install pako 1.0.6 

See using Haxelib in Haxelib documentation for more information.

README.md

haxe-pako

License

Haxe externs for the pako library.

NOTE: You must import the pako library into your HTML file for this to work. In case the source ever goes offline, a copy can be found here: https://github.com/FuzzyWuzzie/haxe-pako/blob/master/libs/pako.min.js

Examples

Deflating and Inflating an Array

var arr:Array<Int> = new Array<Int>();
for(i in 0...100) {
	arr.push(0);
}
arr[5] = 5;
arr[20] = 20;

var input:Uint8Array = new Uint8Array(arr);
js.Browser.document.write('<p>Input: <pre><code>[' + input + ']</code></pre></p>');

var deflated:Uint8Array = Pako.deflate(input);
js.Browser.document.write('<p>Deflated: <pre><code>[' + deflated + ']</code></pre></p>');

var inflated:Uint8Array = Pako.inflate(deflated);
js.Browser.document.write('<p>Inflated: <pre><code>[' + inflated + ']</code></pre></p>');

Live Sample

A live sample is available which deflates an array of integers and successfully re-inflates them.

Contributors
RealyUniqueName
FuzzyWuzzie
Version
1.0.6
Published
8 months ago
License
MIT

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github