Two File TAR
Two File TAR is a Tape Archive sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.
two-files.tarArchive
Tape Archive is a archive format commonly identified by .tar. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.
75 73 74 61 72 ustarSIGNATURE = bytes.fromhex("7573746172")
OFFSET = 257
def is_tar(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATUREconst SIGNATURE = [0x75, 0x73, 0x74, 0x61, 0x72];
const OFFSET = 257;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isTar(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}package fileid
import "bytes"
var istarSignature = []byte{0x75, 0x73, 0x74, 0x61, 0x72}
const istarOffset = 257
func IsTar(b []byte) bool {
end := istarOffset + len(istarSignature)
if len(b) < end {
return false
}
return bytes.Equal(b[istarOffset:end], istarSignature)
}const SIGNATURE: &[u8] = &[0x75, 0x73, 0x74, 0x61, 0x72];
const OFFSET: usize = 257;
fn is_tar(bytes: &[u8]) -> bool {
bytes.get(OFFSET..OFFSET + SIGNATURE.len()) == Some(SIGNATURE)
}<?php
$signature = "\x75\x73\x74\x61\x72";
$offset = 257;
function is_tar(string $bytes): bool {
global $signature, $offset;
return substr($bytes, $offset, strlen($signature)) === $signature;
}Tape Archive is used for compression, extraction, backups, attachments, and multi-file inspection. Validate paths, file counts, compressed size, and extracted size before unpacking.
Archives can contain zip-slip paths, excessive expansion, hidden files, and double extensions. Normalize extraction paths and enforce file count and size limits.
11 samples help test leading-byte detection, parser errors, upload limits, and download behavior.
Two File TAR is a Tape Archive sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.
two-files.tarBlue Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.tar4f2498abfbfb9ee74180bf3a02b3a8f976fd16dc33c134c4c307529d46665609Flower Garden TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
02-flower-garden.tarff19afd6572cafd772d5a916145fac852e97180fd8b2c0ab8b2bd05509c82a55Navy Blue Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
03-navy-blue-sky.tar033cb4ba37d05f5256393369723ef400609baca455d8a72d53c145097a4e7c2cNature of the Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
04-nature-sky.tar248e75969993dea282935a0309e494434cc97dfaa6b088cf22e216319771a9ddSky Landscape TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
05-sky-landscape.tar37f26144c9d8cab02adcce041bc704ca1c62f8dfbf371cfc4f36a16c73e7b8ccStarry Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
06-starry-sky.tarf6a45473e6b56103b67b0dd72518b907b4c1c1cb2ab885e484625000a655118aBlue Night Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
07-blue-night-sky.tarc4a343ba04c0a27cd56fa9d5da7acfda7bd6165e1f68b9921f7aabaa45729030Hibiscus Flower TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
08-hibiscus-flower.tar0b5000a03369440888b0a8af7bf783f0b349ccc83a44e48c5a1c76f7ca9d513aArctic Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
09-arctic-sky.tarbff79945ec6c8e58b31a7dc7061bd11ca8eca8b8c11f90920c8c4dfc9fdacc17NASA Blue Marble TAR is a Tape Archive sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.
nasa-blue-marble-2012-east.tar5314e1c9674de2f0f3f14d952c33991501d04c902b6f5fa22dc70760bac6da35Tape Archive files begin with the byte signature 75 73 74 61 72 ("ustar"). Detect the format by reading these leading bytes rather than trusting the file extension alone.
The MIME type for Tape Archive is application/x-tar.
Tape Archive files use the .tar extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.