satoshinm / NetCraft

Web-based fork of fogleman/Craft ⛺
https://satoshinm.github.io/NetCraft/
MIT License
57 stars 13 forks source link

Add miniz 2.5.0, a zip file decompression library #125

Closed satoshinm closed 7 years ago

satoshinm commented 7 years ago

https://github.com/richgel999/miniz/ https://github.com/richgel999/miniz/releases/download/2.0.5/miniz-2.0.5.zip

for https://github.com/satoshinm/NetCraft/issues/113

satoshinm commented 7 years ago

How much baggage does the miniz dependency add?

before +miniz and using .zip API delta KB
build 314 316
release-build (craft.js) 3844814 3902642 +57828 bytes +56 KB
release-build (craft.html.mem) 62219 62992 +773 bytes +0.75 KB
wasm-build (craft.js) 1101302 1102409 +1107 bytes +1.1 KB
wasm-build (craft.wasm) 1424166 1453293 +29127 bytes +28 KB
native-build (NetCraft-Linux.tar.gz) 1955840 2068480 +112640 bytes +110 KB

For the optimized asmjs build about 57 KB total, and with the WebAssembly build it is smaller due to the compact code size, only 29 KB extra, not bad.