Correctness is testable
Open format-detector fixture corpus
27 deterministic textual fixtures exercise the same bounded parser used on the detector page. The corpus includes ordinary signatures and deliberately hostile declarations without using private user media.
Textual and reproducible
Payloads are checked-in hexadecimal or UTF-8 strings. Tests reconstruct the same bytes on every machine.
Bounded by design
The test contract caps the leading range at 65,536 bytes and the optional non-overlapping trailer at 8,192 bytes.
Classification is not decoding
Minimal container fixtures prove detector behavior. Converter output uses separate independently decodable fixtures.
valid
10 cases| Stable ID | Claim | Expected | Purpose |
|---|---|---|---|
| jpeg-sof-3x2 | sample.jpg image/jpeg | jpeg | Bounded JPEG marker stream with a 3×2 SOF0 and EOI marker. |
| png-rgba-1x1 | sample.png image/png | png | Complete 1×1 RGBA PNG with IHDR, IDAT, and IEND. |
| gif87a-static-1x1 | sample.gif image/gif | gif / GIF87a | Complete GIF87a logical screen with one image descriptor. |
| webp-vp8x-2x3 | sample.webp image/webp | webp / VP8X | RIFF WebP container with a complete VP8X canvas header. |
| tiff-little-endian-3x2 | sample.tif image/tiff | tiff / little-endian | Little-endian TIFF with width and height LONG entries. |
| tiff-big-endian-3x2 | sample.tiff image/tiff | tiff / big-endian | Big-endian TIFF with width and height LONG entries. |
| bmp-infoheader-3x2 | sample.bmp image/bmp | bmp | BMP file and BITMAPINFOHEADER declaring a 3×2 canvas. |
| ico-directory-16 | sample.ico image/x-icon | ico | ICO directory containing one 16×16 embedded resource entry. |
| cur-directory-32 | sample.cur image/x-icon | cur | CUR directory containing one 32×32 embedded resource entry. |
| pdf-minimal | sample.pdf application/pdf | Small PDF syntax fixture with header and EOF marker. |
animated
3 cases| Stable ID | Claim | Expected | Purpose |
|---|---|---|---|
| gif89a-two-frame | animated.gif image/gif | gif / GIF89a | GIF89a stream with two image descriptors and a trailer. |
| webp-vp8x-animated | animated.webp image/webp | webp / VP8X | VP8X WebP animation flag with an ANIM chunk. |
| avif-sequence-brand | sequence.avif image/avif-sequence | avif / avis | AVIF sequence ftyp box using the avis major brand. |
brand
4 cases| Stable ID | Claim | Expected | Purpose |
|---|---|---|---|
| heic-major-brand | sample.heic image/heic | heif / heic | Complete ftyp box with heic major brand and mif1/heic compatibility. |
| heix-major-brand | sample.heic image/heic | heif / heix | Complete ftyp box with heix major brand. |
| heif-mif1-brand | sample.heif image/heif | heif / mif1 | Generic HEIF-compatible ftyp box with mif1 major brand. |
| avif-major-brand | sample.avif image/avif | avif / avif | AVIF ftyp box with avif major brand. |
renamed
1 case| Stable ID | Claim | Expected | Purpose |
|---|---|---|---|
| png-renamed-jpg | renamed.jpg image/jpeg | png | PNG bytes with a .jpg name and JPEG MIME claim. |
truncated
3 cases| Stable ID | Claim | Expected | Purpose |
|---|---|---|---|
| jpeg-truncated-marker | truncated.jpg image/jpeg | jpeg | JPEG SOI and APP marker with a cut-off payload. |
| png-truncated-ihdr | truncated.png image/png | png | PNG signature followed by an incomplete IHDR declaration. |
| heic-truncated-ftyp | truncated.heic image/heic | unknown | ftyp box cut off during its major-brand value. |
zero byte
1 case| Stable ID | Claim | Expected | Purpose |
|---|---|---|---|
| zero-byte | empty.png image/png | unknown | Empty file with no signature. |
polyglot
1 case| Stable ID | Claim | Expected | Purpose |
|---|---|---|---|
| gif-zip-polyglot | polyglot.gif image/gif | gif | Complete GIF87a followed by a ZIP local-file signature. |
leading text
1 case| Stable ID | Claim | Expected | Purpose |
|---|---|---|---|
| svg-leading-xml-comment | sample.svg image/svg+xml | svg | UTF-8 BOM, XML declaration, and comment before the SVG root. |
oversized metadata
2 cases| Stable ID | Claim | Expected | Purpose |
|---|---|---|---|
| png-oversized-dimensions | oversized.png image/png | png | PNG IHDR declaring 4,294,967,295 pixels in each dimension. |
| iso-oversized-box | oversized.heic image/heic | heif / heic | ISO BMFF ftyp box with an impossible 32-bit declared length. |
unknown
1 case| Stable ID | Claim | Expected | Purpose |
|---|---|---|---|
| unknown-random-bytes | not-really.png image/png | unknown | Arbitrary bytes which must not be guessed from the .png name. |
Safety note
Polyglot, active-content, and oversized fixtures are data for parsers. They should not be rendered inline, opened in desktop software, or served with an executable MIME type. The site lists their manifest; tests reconstruct them in memory and never execute them.