A container and a compressor are not the same thing
Two separate jobs get muddled together under the word "archive". Bundling is putting many files into one file, keeping their names and folders. Compression is making bytes smaller. TAR only bundles — a .tar is the size of everything in it added together. Gzip only compresses, and only one stream at a time, which is why .tar.gz exists: bundle first, then squeeze the bundle. ZIP does both at once, per file, and keeps a catalogue of what is inside.
That difference decides how the format behaves under you. Because a ZIP stores a catalogue at the end and compresses each file separately, it can list a ten-gigabyte archive instantly and unpack one file out of the middle without touching the rest — which is exactly what our ZIP reader does, decompressing nothing until you ask for something. A solid archive compresses everything as one continuous stream, so repetition across file boundaries is found and the result is smaller, sometimes much smaller for many similar small files such as source code or logs. The price is that there is no cheap way to reach one file in the middle: everything before it has to be decompressed first. TAR.GZ is solid by nature, 7z compresses in solid blocks, and a RAR is read through from the start here rather than from a catalogue.
Already-compressed content does not compress again. JPEG, PNG, MP3, MP4, PDF and every modern Office file have compression built in, and deflate spends time on them to achieve nothing — occasionally adding a few bytes for the trouble. This is why a zip of a photo folder comes out the same size as the folder and people assume the tool is broken. Create ZIP Archive recognises those formats and stores them as they are instead of pretending, which is why it finishes immediately on photographs and takes its time on text.
The metadata an archive carries is not the metadata your disk has. A ZIP stores modification times in the MS-DOS format, which has two-second resolution and cannot represent a date before 1980 or after 2099 — dates outside that range are clamped here rather than being allowed to fail the whole archive, which is a real bug we hit converting RARs that carried a zero date. A TAR stores Unix permissions, ownership and symbolic links. A browser can read none of those from your disk and cannot write any of them back, so Create TAR Archive writes a sensible default mode, and our extractors list permissions and links rather than restoring them. If an archive is a backup that has to come back exactly as it went in, it needs to be made and restored by tar on the machine itself.
ZIP encryption comes in two kinds and only one of them is worth anything. The original ZipCrypto scheme is broken to the point of being decorative — a known-plaintext attack recovers the contents in seconds on ordinary hardware, and most software still offers it by default. AES-256, added later, is real encryption and is not breakable. Neither is offered here: we will not ship the broken one, and the modern one has no browser-native implementation we can use under a permissive licence. Worth knowing either way: a ZIP never encrypts its file names, so the catalogue of an encrypted archive is readable by anyone. "Invoices/2024/Settlement-confidential.pdf" is visible without the password.
An archive is the one kind of file whose contents can attack the program opening it. A file inside can be named "../../.bashrc" to escape the folder it is unpacked into, and a few kilobytes can be crafted to expand into terabytes and take the tab down. Both are handled before you see anything: hostile names — parent-directory climbs, absolute paths, Windows drive letters, reserved device names, invisible characters used to disguise an extension — are clamped and every correction is listed, and expansion ratios are measured and refused rather than attempted. Symbolic links inside an archive are shown but never followed.