Skip to content

Instantly share code, notes, and snippets.

@taralx
taralx / zip.mjs
Created May 9, 2021 06:48
Zip files on web platform
const GZIP_HEADER = Uint8Array.from([
31, 139, // gzip magic
8, // deflate
0, // no extra fields
0, 0, 0, 0, // mtime (n/a)
0, 0, // extra flags, OS
]);
class ZipEntry {
constructor(f, meta) {

Keybase proof

I hereby claim:

  • I am taralx on github.
  • I am taral (https://keybase.io/taral) on keybase.
  • I have a public key whose fingerprint is 6C72 DCD5 3A5E 2F2D AE78 0614 4A4B B975 04B3 6DFA

To claim this, I am signing this object: