Batteries
Zip
gzip, deflate, and .zip archives packed and unpacked.Squeezing bytes
zip.gzip and zip.deflate take text or bytes and give bytes; zip.gunzip and zip.inflate give the first bytes back. Mote's own wasm, in a worker.gzip, deflate, and back againType, and both are worked out again. Repeated text shrinks well; random letters hardly at all; a few words grow.
0 bytes of text
gzip is deflate with a ten-byte header (1f 8b …) and a checksum after. Archives
zip.pack makes a .zip of named files; zip.unpack gives a .zip's files as {name, data}. A name with a slash is a file in a folder.zip.packName some texts, pack them, download the archive. What is listed under the button is read back out of it with zip.unpack.
zip.unpackDrop a .zip here, pick one, or open the one packed beside this. Press a file to see how it begins.
Drop a .zip here Nothing opened yet.