Use case · 16 files
Test archive extraction
Extracting user-supplied archives is a classic source of security bugs. These files cover the formats you need to support and the structural limits your extractor should enforce. Every file here is safe; see the guide for handling path traversal and compression bombs.
Download all with curl
# 16 files, 5.1 MB in total
while read -r url; do curl -LO --fail "$url"; done <<'EOF'
https://files.samplefiles.com/archive/zip/sample-folders.zip
https://files.samplefiles.com/archive/tar/sample.tar
https://files.samplefiles.com/archive/gz/sample.tar.gz
https://files.samplefiles.com/archive/bz2/sample.tar.bz2
https://files.samplefiles.com/archive/xz/sample.tar.xz
https://files.samplefiles.com/archive/7z/sample.7z
https://files.samplefiles.com/archive/zip/sample-password-protected.zip
https://files.samplefiles.com/archive/7z/sample-password-protected.7z
https://files.samplefiles.com/edge-cases/archives/nested-3-levels.zip
https://files.samplefiles.com/edge-cases/archives/1000-files.zip
https://files.samplefiles.com/edge-cases/archives/unicode-names.zip
https://files.samplefiles.com/edge-cases/archives/folders-only.zip
https://files.samplefiles.com/edge-cases/archives/with-comment.zip
https://files.samplefiles.com/edge-cases/corrupt/truncated.zip
https://files.samplefiles.com/edge-cases/corrupt/crc-mismatch.zip
https://files.samplefiles.com/edge-cases/empty/empty-archive.zip
EOFRead first: Extracting user-uploaded archives safely · ZIP vs 7z vs tar.gz vs zst: which archive format to use
Formats
The same folder tree in every common archive format.
| File | Size | Details | Download |
|---|---|---|---|
| ZIP with nested folderssample-folders.zip | 499 KB | 8 entries | Download |
| TAR archivesample.tar | 720 KB | 8 entries | Download |
| TAR.GZ (tarball)sample.tar.gz | 500 KB | 8 entries | Download |
| TAR.BZ2 archivesample.tar.bz2 | 501 KB | 8 entries | Download |
| TAR.XZ archivesample.tar.xz | 467 KB | 8 entries | Download |
| 7Z archivesample.7z | 467 KB | 8 entries | Download |
Encrypted archives
The password for both is samplefiles.
| File | Size | Details | Download |
|---|---|---|---|
| ZIP, password-protectedsample-password-protected.zip | 523 KB | 6 entries · 🔒 password | Download |
| 7Z, password-protectedsample-password-protected.7z | 467 KB | 8 entries · 🔒 password | Download |
Structural oddities
Deep nesting, many entries, Unicode names, folders only, and a comment.
| File | Size | Details | Download |
|---|---|---|---|
| ZIP nested 3 levels deepnested-3-levels.zip | 486 B | 2 entries | Download |
| ZIP with 1,000 files1000-files.zip | 110 KB | 1,000 entries | Download |
| ZIP with Unicode file namesunicode-names.zip | 699 B | 5 entries | Download |
| ZIP with only empty foldersfolders-only.zip | 246 B | 2 entries | Download |
| ZIP with an archive commentwith-comment.zip | 200 B | 1 entry | Download |
Broken archives
A missing central directory, a CRC error and an empty archive.
| File | Size | Details | Download |
|---|---|---|---|
| Truncated ZIPtruncated.zip | 523 KB | Download | |
| ZIP with a CRC errorcrc-mismatch.zip | 524 KB | Download | |
| Valid empty ZIPempty-archive.zip | 22 B | 0 entries | Download |