Pikkola ZIP, tool No. 94

A zip file that never leaves the tab.

Drop files, add a nickname and a note, and download a real .zip: local headers, a central directory, CRC32 and deflate. Or drop an existing archive and read its entries, its compression ratio and any single file inside it, without a server anywhere in the path.

2
ways to use it
0
uploads
0
bytes stored

The parcel bench

Build one, or open one

The writer and the reader are the same library, so the archive on the right can be the archive the left just made. Sizes are read from the central directory, not guessed from the file.

Build an archive

Drop files here

Read and zipped in this tab.

Read an archive

Drop a .zip here

Parsed in this tab.

What a zip actually is

An archive is a sequence of files followed by an index. Every reader starts at the index, which is why a zip can be listed without decompressing anything.

01

The index is at the end

Each file has a local header and its data. At the end, a central directory repeats the name, the sizes and the CRC of every entry, and an end record gives the directory's offset. A reader finds the end record by scanning backwards and then jumps to the directory.

02

CRC32 is the integrity check

Every entry stores a 32-bit CRC of its uncompressed bytes. It catches a truncated download and a corrupted transfer, and it does not catch a deliberate change: a CRC is a checksum, not a signature. This page computes it in JavaScript and compares it after every extraction.

03

Deflate is optional per entry

Method 0 stores the bytes, method 8 deflates them. A small file often gets bigger when deflated, so a good writer stores it instead of paying for the attempt. The browser's own CompressionStream does the work at native speed, and the page falls back to storing when the browser has no stream.

What is read, and what stays out

The reader is strict about what it can prove and plain about what it cannot. An archive is a container, and a container can lie.

Part What this page does What it will not do
Files you add Read with the browser's file reader into memory and zipped there Upload, cache or keep a copy after the tab closes
Entry names Written as UTF-8 with the language flag set Transliterate a Korean name into ASCII
Compression deflate-raw through CompressionStream, one entry at a time, kept only when it shrinks Compress with a library of its own, or promise better than deflate
Extraction One entry at a time, with its CRC checked before the file is handed over Unpack an archive into a folder, or run anything inside it
zip64 and encryption Refused with a message that names the reason Half-read an archive larger than four gigabytes or a password protected entry
The output A standard zip that unzip, Finder, Explorer and python's zipfile open Write a proprietary archive, or add a comment this page cannot read back

A zip is not a safe place to open a stranger's file: a name can contain a path that escapes the folder on extraction, which is the zip slip bug. This page never writes an entry to a disk path, so it cannot suffer it, and a server that unpacks uploads should check every name for ../ before it does.

Field guide

Headers, an index and a checksum

A zip is simple enough to write by hand: a header and the data for each file, then one index that repeats what matters, then a small record that points at the index. This page does exactly that on both sides.

Why a reader starts at the end

The last 22 bytes of a zip are the end-of-central-directory record: the number of entries, the size of the central directory and its offset. A reader scans backwards for the signature 50 4B 05 06, jumps to the directory, and only then learns where each file's local header sits. That design is why listing a 4 GB archive is instant: the index is at the end, and no file data is touched.

It also explains the two ways an archive goes wrong in practice. A truncated download loses the end record, so the reader finds nothing even though most of the file is present. A file appended after the end record breaks the offset, so the directory points into the middle of something else. Both are reported here as a specific failure rather than as "invalid zip".

CRC32 is cheap, and that is the point

Every entry stores a 32-bit CRC of its uncompressed bytes, computed with the reflected polynomial 0xEDB88320. It is fast enough to compute while writing and while reading, it detects the kind of damage that a network or a truncated file produces, and it costs four bytes per entry. It is not a security check: a CRC is linear, so a deliberate change can be arranged to keep the same value, and anyone modifying an archive can update both the data and the check.

For integrity against a deliberate change you need a digest, which is why a download page publishes a SHA-256 beside the file. The CRC in the zip is for the archive's own consistency; the digest is for trust.

Deflate, and when storing wins

Method 8 is deflate: a 32 KB sliding window, Huffman codes and a stream of length and distance pairs. The browser exposes the raw stream through CompressionStream("deflate-raw"), which is the same algorithm a native zipper uses and runs at native speed. For a file smaller than a few hundred bytes the header overhead can exceed the saving, and for an already compressed file there is no saving at all, so this writer keeps the smaller of the two and records which method won.

The ratio in the inspector is computed from the sizes in the central directory, not from the bytes on disk, so it reflects what the archive claims. That is what an unzip will act on, and a claim that disagrees with the data is exactly what the CRC check catches.

zip slip, and why this page cannot catch it for you

Entry names are paths as far as some tools are concerned. An archive with an entry named ../../etc/cron.d/job can, on a naive extractor, write outside the folder it was told to use. This is zip slip, and it is a property of the extractor, not of the format: this page never writes an entry to a path, so it cannot be exploited that way, and a server that unpacks uploads must reject any name with .., an absolute path or a backslash before it writes anything.

The names here are written as UTF-8 with the general purpose bit 11 set, which is how every current tool reads a Korean file name correctly. An older extractor that ignores the flag may show mojibake; that is a limitation of the reader, and converting the name to ASCII would hide the file instead of fixing it.

zip64, encryption and the honest refusal

An archive over four gigabytes, or with more than 65,535 entries, uses zip64: the counts and offsets are replaced by a marker and the real values move into extra fields. Reading that correctly is a different code path, so this reader detects the marker and says it does not support zip64 rather than reading half the directory and reporting the rest as damage. Encrypted entries are refused the same way: the flag is visible, and a guess would be worse than a message.

When a binary has to travel through a channel that only carries text, Pikkola Base64 makes the trip. When the question is whether a file is the one you meant, Pikkola Hash answers it.

Questions

Are my files uploaded?

No. They are read with the browser's own file reader, kept in memory and assembled into a zip in this tab. Nothing is stored, so closing or reloading the page forgets them, and the only request the page makes after it loads is the cookieless page-view count. That makes it usable for a document you would not put on a file sharing site.

Will the zip open on Windows and macOS?

Yes. The output is a standard archive: local headers, a central directory and an end record, deflate for entries that shrink and stored for the rest, UTF-8 names with the language flag. Finder, Explorer, unzip and python's zipfile read it, and the page's own reader is checked against python's zipfile in its tests.

Why is my zip barely smaller?

Because the files were already compressed. A JPEG, a PNG, an MP3, an .xlsx or a PDF with compressed streams is close to incompressible, and deflate cannot improve it. Text, JSON, CSV, SVG, source code and logs are where the ratio comes from: a log file often drops by ninety percent.

Can it open a password protected zip?

No. Encrypted entries use a flag this reader reports rather than guesses at, and the page says the entry cannot be read here. Use 7-Zip or the system tool for those. The writer here never encrypts, so an archive it makes is readable by anyone who gets it, which is worth remembering before zipping anything private.

What is the size limit?

The whole archive is assembled in memory, so the practical limit is the tab's memory, a few hundred megabytes on a desktop and less on a phone. Entries above four gigabytes would need zip64, which is refused. For a big archive, split it into parts and zip each one.