🗜️⚡ wasm-flate
WebAssembly powered compression and decompression in the browser and server.
Docs
var flate = ;var pako = ; var data = Buffer ;// Uint8Array [// 72, 101, 108, 108,// 111, 32, 87, 111,// 114, 108, 100// ]
compress with wasm-flate
flate// Uint8Array [// 243, 72, 205, 201, 201,// 87, 8, 207, 47, 202,// 73, 1, 0// ]
Then compress with pako
pako// Uint8Array [// 243, 72, 205, 201, 201,// 87, 8, 207, 47, 202,// 73, 1, 0// ]
you can see the output is the same 🎉
you can even compress with one library and decompress with the other one
var data = Buffer ;var compressed_with_wasm_flate = flatevar decompressed_with_pako = pako // covert to a string - since JS doesnt let us directly compare UintArraysvar original = "utf-8"var evaluated = "utf-8"original === evaluated// true
Donate Here
If you found wasm-flate
useful feel free to buy me a beer 🍺 or two 😀
BTC - 3QVK6D5QCZDSyLzFL3ZbELokyuSprRQQZF