Sample 7z, TAR and GZIP files — free download
Archives beyond ZIP: TAR and GZIP for Unix-style extraction paths, a .tar.gz where double-extension handling usually goes wrong, and a .7z for extractors that accept the extension without being able to read the format.
4 ready-made archive test files
| File | Size | What it catches | |
|---|---|---|---|
| single-file.gz | 146 bytes | The distinction between gzip-of-one-file and tar.gz. Decompressors that always try to untar the result will fail on this; the FNAME header field also tests filename recovery. | download |
| valid.tar.gz | 188 bytes | The two-stage decode (gunzip, then untar) that trips code expecting a single compression step. Also a media-type check: .tar.gz is application/gzip on the outside, not application/x-tar. | download |
| stored.7z | 303 bytes | Extractors and upload filters that accept .7z by extension without being able to read one. The format is laid out back to front - the signature header points at metadata that sits after the payload - so a truncated download fails in a way ZIP does not. Extracts with 7-Zip, p7zip and py7zr, and each entry carries its own CRC32, so corruption is detected per file rather than for the archive as a whole. | download |
| valid.tar | 4.0 KB | Tar handling as distinct from zip: no central directory, 512-byte headers, octal size fields. Catches code that assumes "archive" means zip. | download |
Every file is generated from source — no third-party copyright — and each has its own page with a published SHA-256 you can verify after download.
Questions
Where can I download a sample 7z file?
The .7z below holds three files, one of them in a subdirectory, stored rather than compressed. It extracts with 7-Zip, p7zip and py7zr, and every entry carries its own CRC32 so corruption is caught per file.
Why does a truncated .7z fail differently from a truncated ZIP?
Because 7z is laid out back to front. Its 32-byte signature header points at a metadata block that sits after all the payload, so losing the tail of the download costs you the file list itself. A ZIP loses its central directory the same way, but ZIP readers can usually rebuild it by scanning local headers; 7z has no equivalent fallback.
Where can I download a sample tar.gz file?
The .tar.gz below is a real gzip-compressed tar archive, extractable with tar -xzf.
Why is the TAR magic not at byte 0?
The ustar magic sits 257 bytes into the first header block, unlike almost every other format. Signature checks that only read the first 16 bytes will miss it entirely.