Truncated Streams, Corrupted Checksums, Negative QA Fixtures and Error Recovery Across 54 Formats: Questions and Answers
Engineering reference answering 100 distinct technical questions on how parsers detect truncated uploads, bit-rot CRC failures, invalid headers, and malformed syntax across all 54 file formats, and how to test negative paths safely across all 54 file formats supported by SampleTestFiles.
Representative format hubs and diagnostic tools
Part 1: Document, spreadsheet and text format questions
- 1. How do you construct a negative QA test for a corrupted or truncated .avro (Avro) file, and what error should your parser return?
- Take sample-avro-1kb.avro (1,024 bytes) and slice off the final 128 bytes or flip a header byte in 4F 62 6A 01; because altering the 16-byte sync marker at the end of a data block causes fastavro and Java Avro readers to raise an invalid sync marker exception, your negative test suite for Hadoop/Spark data lakes will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 2. How do you construct a negative QA test for a corrupted or truncated .bin (BIN) file, and what error should your parser return?
- Take sample-bin-1kb.bin (1,024 bytes) and slice off the final 128 bytes or flip a header byte in None; because reading a binary .bin stream through a UTF-8 text decoder corrupts every byte >= 0x80 into U+FFFD replacement characters (EF BF BD), your negative test suite for and byte-range resume checks will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 3. How do you construct a negative QA test for a corrupted or truncated .bmp (BMP) file, and what error should your parser return?
- Take sample-bmp-10kb.bmp (10,240 bytes) and slice off the final 128 bytes or flip a header byte in 42 4D; because forgetting that BMP rows are padded to a multiple of 4 bytes when width * 3 is not divisible by 4 skews every scanline diagonally, your negative test suite for embedded C/C++ firmware display tests will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 4. How do you construct a negative QA test for a corrupted or truncated .css (CSS) file, and what error should your parser return?
- Take sample-css-1kb.css (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because serving a .css file with Content-Type: text/plain when X-Content-Type-Options: nosniff is active causes browsers to refuse to apply the stylesheet, your negative test suite for Content-Security-Policy style-src testing will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 5. How do you construct a negative QA test for a corrupted or truncated .csv (CSV) file, and what error should your parser return?
- Take sample-csv-1kb.csv (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because an unclosed double quote on row N causes an RFC 4180 state machine to consume all subsequent rows into a single multi-line field until EOF, your negative test suite for database bulk COPY loads will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 6. How do you construct a negative QA test for a corrupted or truncated .docx (DOCX) file, and what error should your parser return?
- Take sample-docx-50kb.docx (51,200 bytes) and slice off the final 128 bytes or flip a header byte in 50 4B 03 04; because preventing OpenXML parsers from locating word/document.xml, your negative test suite for contract template engines will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 7. How do you construct a negative QA test for a corrupted or truncated .eml (EML) file, and what error should your parser return?
- Take sample-eml-1kb.eml (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because omitting the blank CRLF separator line between headers and body causes parsers to treat the entire message body as malformed header lines, your negative test suite for phishing/spam filter test harnesses will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 8. How do you construct a negative QA test for a corrupted or truncated .epub (EPUB) file, and what error should your parser return?
- Take sample-epub-10kb.epub (10,240 bytes) and slice off the final 128 bytes or flip a header byte in 50 4B 03 04; because placing META-INF/container.xml before the mimetype entry in the ZIP stream causes EPUBCheck error PKG-006 (mimetype must be first at offset 30), your negative test suite for e-reader ingestion pipelines will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 9. How do you construct a negative QA test for a corrupted or truncated .flac (FLAC) file, and what error should your parser return?
- Take sample-flac-100kb.flac (102,400 bytes) and slice off the final 128 bytes or flip a header byte in 66 4C 61 43; because modifying audio frames without updating the 16-byte raw-PCM MD5 checksum in the STREAMINFO block causes flac -t verification to fail, your negative test suite for lossless music archival will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 10. How do you construct a negative QA test for a corrupted or truncated .geojson (GeoJSON) file, and what error should your parser return?
- Take sample-geojson-1kb.geojson (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because latitude] to [latitude, your negative test suite for delivery-zone polygon validation will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 11. How do you construct a negative QA test for a corrupted or truncated .gif (GIF) file, and what error should your parser return?
- Take sample-gif-10kb.gif (10,240 bytes) and slice off the final 128 bytes or flip a header byte in 47 49 46 38 39 61; because missing the final 0x3B semicolon trailer byte or corrupting an LZW sub-block length byte causes frame decoders to fail, your negative test suite for and multi-frame coalescing checks will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 12. How do you construct a negative QA test for a corrupted or truncated .gltf (glTF) file, and what error should your parser return?
- Take sample-gltf-1kb.gltf (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because miscalculating accessor byteOffset or byteLength against the decoded base64 buffer length triggers a BUFFER_VIEW_OUT_OF_BOUNDS error in glTF-Validator, your negative test suite for WebXR/WebGL 3D product configurators will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 13. How do you construct a negative QA test for a corrupted or truncated .gpx (GPX) file, and what error should your parser return?
- Take sample-gpx-1kb.gpx (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because omitting the lat and lon attributes on <trkpt> or mixing local timezones without a Z UTC suffix in <time> breaks pace and elevation gain calculations, your negative test suite for fleet telematics replay will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 14. How do you construct a negative QA test for a corrupted or truncated .gz (GZ) file, and what error should your parser return?
- Take sample-gz-1kb.gz (1,024 bytes) and slice off the final 128 bytes or flip a header byte in 1F 8B 08; because relying on the trailing 4-byte ISIZE field for files over 4 GB (since ISIZE wraps modulo 2^32), your negative test suite for database dump archiving will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 15. How do you construct a negative QA test for a corrupted or truncated .html (HTML) file, and what error should your parser return?
- Take sample-html-1kb.html (1,024 bytes) and slice off the final 128 bytes or flip a header byte in 3C 21 44 4F 43 54 59 50 45; because uploading unsanitized HTML to an endpoint that serves files without Content-Disposition: attachment allows stored XSS execution, your negative test suite for and CMS rich-text import filters will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 16. How do you construct a negative QA test for a corrupted or truncated .ico (ICO) file, and what error should your parser return?
- Take sample-ico-10kb.ico (10,240 bytes) and slice off the final 128 bytes or flip a header byte in 00 00 01 00; because confusing type=1 (00 00 01 00 ICO icon) with type=2 (00 00 02 00 CUR cursor) in the 6-byte header, your negative test suite for desktop application packaging will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 17. How do you construct a negative QA test for a corrupted or truncated .ics (iCalendar) file, and what error should your parser return?
- Take sample-ics-1kb.ics (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because omitting mandatory UID or DTSTAMP properties inside a VEVENT block causes strict CalDAV servers and Outlook to reject the calendar import, your negative test suite for calendar sync integrations will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 18. How do you construct a negative QA test for a corrupted or truncated .ini (INI) file, and what error should your parser return?
- Take sample-ini-1kb.ini (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because placing key=value lines before the first [section] header causes Python's configparser to raise MissingSectionHeaderError, your negative test suite for desktop application preferences will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 19. How do you construct a negative QA test for a corrupted or truncated .jpg (JPG) file, and what error should your parser return?
- Take sample-jpg-1kb.jpg (1,024 bytes) and slice off the final 128 bytes or flip a header byte in FF D8 FF; because truncating the stream before the final FF D9 End-of-Image marker leaves the bottom scanlines grey or causes strict decoders to reject the image, your negative test suite for and CDN image optimization pipelines will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 20. How do you construct a negative QA test for a corrupted or truncated .js (JavaScript) file, and what error should your parser return?
- Take sample-js-1kb.js (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because uploading .js files to a poorly configured static bucket without nosniff and attachment headers creates script-execution risks, your negative test suite for AST parser benchmarks will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 21. How do you construct a negative QA test for a corrupted or truncated .json (JSON) file, and what error should your parser return?
- Take sample-json-1kb.json (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because trailing commas after the last property or single-quoted strings violate RFC 8259 and throw SyntaxError in standard JSON.parse, your negative test suite for NoSQL document imports will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 22. How do you construct a negative QA test for a corrupted or truncated .jsonl (JSONL) file, and what error should your parser return?
- Take sample-jsonl-1kb.jsonl (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because pretty-printing an object across multiple lines breaks line-by-line streaming parsers that call JSON.parse on each individual line, your negative test suite for log shipping pipelines will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 23. How do you construct a negative QA test for a corrupted or truncated .kml (KML) file, and what error should your parser return?
- Take sample-kml-1kb.kml (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because lat, your negative test suite for and geospatial XML conversion will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 24. How do you construct a negative QA test for a corrupted or truncated .log (LOG) file, and what error should your parser return?
- Take sample-log-1kb.log (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because multiline stack traces mixed into single-line access logs break regex line parsers unless multiline aggregation rules are configured, your negative test suite for SIEM ingestion pipelines will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 25. How do you construct a negative QA test for a corrupted or truncated .m4a (M4A) file, and what error should your parser return?
- Take sample-m4a-100kb.m4a (102,400 bytes) and slice off the final 128 bytes or flip a header byte in 66 74 79 70 4D 34 41 20 at byte offset 4; because confusing MP4-wrapped .m4a files (ftypM4A ) with raw ADTS .aac streams (FF F1), your negative test suite for podcast RSS distribution will catch the fault immediately and return a structured 400/422 error rather than crashing.
Part 2: Image, audio, video, archive and 3D format questions
- 1. How do you construct a negative QA test for a corrupted or truncated .md (Markdown) file, and what error should your parser return?
- Take sample-md-1kb.md (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because leaving an unclosed triple-backtick code fence causes downstream sections to be swallowed into a single <pre><code> node, your negative test suite for Next.js) will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 2. How do you construct a negative QA test for a corrupted or truncated .mkv (MKV) file, and what error should your parser return?
- Take sample-mkv-100kb.mkv (102,400 bytes) and slice off the final 128 bytes or flip a header byte in 1A 45 DF A3; because assuming every 1A 45 DF A3 file is WebM without reading the EBML DocType string ('matroska' vs. 'webm'), your negative test suite for multi-track video archival will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 3. How do you construct a negative QA test for a corrupted or truncated .mov (MOV) file, and what error should your parser return?
- Take sample-mov-100kb.mov (102,400 bytes) and slice off the final 128 bytes or flip a header byte in 66 74 79 70 71 74 20 20 at byte offset 4; because uploading a QuickTime .mov recorded on iOS without checking whether the inner video track is H.264 (avc1) or HEVC (hvc1), your negative test suite for video editing NLE ingestion will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 4. How do you construct a negative QA test for a corrupted or truncated .mp3 (MP3) file, and what error should your parser return?
- Take sample-mp3-100kb.mp3 (102,400 bytes) and slice off the final 128 bytes or flip a header byte in 49 44 33; because rejecting valid MP3 uploads because the file starts with 49 44 33 ('ID3') instead of a bare FF FB MPEG frame sync word, your negative test suite for voice-note players will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 5. How do you construct a negative QA test for a corrupted or truncated .mp4 (MP4) file, and what error should your parser return?
- Take sample-mp4-100kb.mp4 (102,400 bytes) and slice off the final 128 bytes or flip a header byte in 66 74 79 70 at byte offset 4; because truncating an MP4 file whose moov box sits at the end of the file leaves the mdat frames unindexed and unplayable, your negative test suite for HLS/DASH transcoding queues will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 6. How do you construct a negative QA test for a corrupted or truncated .obj (OBJ) file, and what error should your parser return?
- Take sample-obj-1kb.obj (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because using 0-based indices instead of Wavefront's mandatory 1-based vertex indexing shifts every triangle face or crashes the mesh loader, your negative test suite for 3D model conversion pipelines will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 7. How do you construct a negative QA test for a corrupted or truncated .ods (ODS) file, and what error should your parser return?
- Take sample-ods-10kb.ods (10,240 bytes) and slice off the final 128 bytes or flip a header byte in 50 4B 03 04; because omitting office:value-type='float' on numeric cells causes formulas to treat cell contents as zero-valued text strings, your negative test suite for and government open-data portals will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 8. How do you construct a negative QA test for a corrupted or truncated .odt (ODT) file, and what error should your parser return?
- Take sample-odt-10kb.odt (10,240 bytes) and slice off the final 128 bytes or flip a header byte in 50 4B 03 04; because compressing the first mimetype entry with DEFLATE violates the OASIS ODF packaging rule requiring magic-byte sniffers to read the MIME string at offset 38 in plain ASCII, your negative test suite for public-sector document portals will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 9. How do you construct a negative QA test for a corrupted or truncated .pdf (PDF) file, and what error should your parser return?
- Take sample-pdf-5kb.pdf (5,120 bytes) and slice off the final 128 bytes or flip a header byte in 25 50 44 46 2D; because forcing viewers to attempt a full linear object scan, your negative test suite for text-extraction pipelines will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 10. How do you construct a negative QA test for a corrupted or truncated .png (PNG) file, and what error should your parser return?
- Take sample-png-1kb.png (1,024 bytes) and slice off the final 128 bytes or flip a header byte in 89 50 4E 47 0D 0A 1A 0A; because altering a single byte in IHDR or tEXt without updating its 4-byte big-endian CRC-32 causes libpng and browsers to abort decoding with a CRC error, your negative test suite for and chunk-CRC validation testing will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 11. How do you construct a negative QA test for a corrupted or truncated .pptx (PPTX) file, and what error should your parser return?
- Take sample-pptx-100kb.pptx (102,400 bytes) and slice off the final 128 bytes or flip a header byte in 50 4B 03 04; because missing relationship entries in ppt/slides/_rels/slide1.xml.rels breaks embedded image and layout references when opened in PowerPoint, your negative test suite for slide-to-PDF conversion workers will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 12. How do you construct a negative QA test for a corrupted or truncated .rtf (RTF) file, and what error should your parser return?
- Take sample-rtf-1kb.rtf (1,024 bytes) and slice off the final 128 bytes or flip a header byte in 7B 5C 72 74 66 31; because dropping the final closing curly brace } leaves the root \rtf1 group unclosed, your negative test suite for legacy word-processor migration will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 13. How do you construct a negative QA test for a corrupted or truncated .sql (SQL) file, and what error should your parser return?
- Take sample-sql-1kb.sql (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because unescaped single quotes inside a SQL string literal break statement parsing and expose SQL injection vulnerabilities in naive string builders, your negative test suite for SQL syntax highlighters will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 14. How do you construct a negative QA test for a corrupted or truncated .srt (SRT) file, and what error should your parser return?
- Take sample-srt-1kb.srt (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because using a period instead of a comma before milliseconds (00:00:01.500 instead of 00:00:01, your negative test suite for video accessibility caption uploaders will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 15. How do you construct a negative QA test for a corrupted or truncated .stl (STL) file, and what error should your parser return?
- Take sample-stl-1kb.stl (1,024 bytes) and slice off the final 128 bytes or flip a header byte in 73 6F 6C 69 64; because when many binary STL exporters write 'solid' in their 80-byte binary header (always check if 84 + uint32_at_80 * 50 == file_size), your negative test suite for 3D printing slicer uploaders will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 16. How do you construct a negative QA test for a corrupted or truncated .svg (SVG) file, and what error should your parser return?
- Take sample-svg-1kb.svg (1,024 bytes) and slice off the final 128 bytes or flip a header byte in 3C 73 76 67; because omitting the xmlns="http://www.w3.org/2000/svg" namespace attribute causes browsers opening the file directly to display raw XML text instead of rendering the graphic, your negative test suite for vector-to-PNG rasterizers will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 17. How do you construct a negative QA test for a corrupted or truncated .tar (TAR) file, and what error should your parser return?
- Take sample-tar-10kb.tar (10,240 bytes) and slice off the final 128 bytes or flip a header byte in 75 73 74 61 72 at byte offset 257; because or failing to validate octal header checksums, your negative test suite for Docker/OCI container layer inspection will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 18. How do you construct a negative QA test for a corrupted or truncated .tiff (TIFF) file, and what error should your parser return?
- Take sample-tiff-10kb.tiff (10,240 bytes) and slice off the final 128 bytes or flip a header byte in 49 49 2A 00; because hardcoding little-endian integer reads in a parser causes it to fail on big-endian (4D 4D 00 2A) TIFF files produced by macOS and high-end scanners, your negative test suite for and GIS GeoTIFF coordinate testing will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 19. How do you construct a negative QA test for a corrupted or truncated .toml (TOML) file, and what error should your parser return?
- Take sample-toml-1kb.toml (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because redefining the same [table] header twice or mixing data types in an inline array (in TOML v0.4 parsers) fails validation, your negative test suite for Python pyproject.toml packaging will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 20. How do you construct a negative QA test for a corrupted or truncated .tsv (TSV) file, and what error should your parser return?
- Take sample-tsv-1kb.tsv (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because untrimmed literal tab characters inside a free-text field shift all subsequent column values one column to the right, your negative test suite for NLP training corpora will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 21. How do you construct a negative QA test for a corrupted or truncated .txt (TXT) file, and what error should your parser return?
- Take sample-txt-1kb.txt (1,024 bytes) and slice off the final 128 bytes or flip a header byte in None; because injecting invalid UTF-8 continuation bytes (0xFF, your negative test suite for character-encoding detection will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 22. How do you construct a negative QA test for a corrupted or truncated .vtt (WebVTT) file, and what error should your parser return?
- Take sample-vtt-1kb.vtt (1,024 bytes) and slice off the final 128 bytes or flip a header byte in 57 45 42 56 54 54; because missing the leading WEBVTT header on line 1 or prepending a non-UTF-8 encoding causes HTML5 <track> elements to discard the entire subtitle track silently, your negative test suite for and audio-description synchronization tests will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 23. How do you construct a negative QA test for a corrupted or truncated .wav (WAV) file, and what error should your parser return?
- Take sample-wav-100kb.wav (102,400 bytes) and slice off the final 128 bytes or flip a header byte in 52 49 46 46 ?? ?? ?? ?? 57 41 56 45; because 295 bytes overflows the unsigned 32-bit RIFF chunk size field (requiring RF64 or Sony Wave64 .w64), your negative test suite for speech-to-text API uploads will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 24. How do you construct a negative QA test for a corrupted or truncated .webm (WebM) file, and what error should your parser return?
- Take sample-webm-100kb.webm (102,400 bytes) and slice off the final 128 bytes or flip a header byte in 1A 45 DF A3; because serving a .webm file with an incompatible audio codec (such as AAC instead of Vorbis/Opus) violates the WebM container specification, your negative test suite for MediaRecorder browser capture tests will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 25. How do you construct a negative QA test for a corrupted or truncated .webp (WebP) file, and what error should your parser return?
- Take sample-webp-10kb.webp (10,240 bytes) and slice off the final 128 bytes or flip a header byte in 52 49 46 46 ?? ?? ?? ?? 57 45 42 50; because leaving the 32-bit RIFF payload size at bytes 4–7 inconsistent with the actual file length causes strict RIFF demuxers to reject the file, your negative test suite for and transparent product thumbnails will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 26. How do you construct a negative QA test for a corrupted or truncated .xlsx (XLSX) file, and what error should your parser return?
- Take sample-xlsx-10kb.xlsx (10,240 bytes) and slice off the final 128 bytes or flip a header byte in 50 4B 03 04; because mismatching a cell's t='s' shared-string index against the count of <si> items in xl/sharedStrings.xml causes spreadsheet readers to throw an index-out-of-bounds error, your negative test suite for and formula evaluation engines will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 27. How do you construct a negative QA test for a corrupted or truncated .xml (XML) file, and what error should your parser return?
- Take sample-xml-1kb.xml (1,024 bytes) and slice off the final 128 bytes or flip a header byte in 3C 3F 78 6D 6C; because including an unescaped ampersand (&) or left angle bracket (<) inside element text immediately halts W3C-compliant XML parsers with a fatal well-formedness error, your negative test suite for sitemaps will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 28. How do you construct a negative QA test for a corrupted or truncated .yaml (YAML) file, and what error should your parser return?
- Take sample-yaml-1kb.yaml (1,024 bytes) and slice off the final 128 bytes or flip a header byte in UTF-8 text; because mixing tab characters (0x09) with spaces in indentation or leaving colons unquoted inside strings triggers a YAML scanner error, your negative test suite for GitHub Actions / GitLab CI pipelines will catch the fault immediately and return a structured 400/422 error rather than crashing.
- 29. How do you construct a negative QA test for a corrupted or truncated .zip (ZIP) file, and what error should your parser return?
- Take sample-zip-1kb.zip (1,024 bytes) and slice off the final 128 bytes or flip a header byte in 50 4B 03 04; because corrupting payload bytes so the computed CRC-32 disagrees with the header (tested by our zip-corrupted-crc fixture) or Zip Slip '../' path traversal, your negative test suite for Lambda/Function deployment bundles will catch the fault immediately and return a structured 400/422 error rather than crashing.
Part 3: Architecture, implementation and pipeline questions
- 1. What is the difference between testing a 0-byte .avro file and a mid-stream truncated .avro file?
- A 0-byte .avro file fails the initial minimum-size and 4F 62 6A 01 magic-byte check immediately, whereas a mid-stream truncated .avro file passes the header check and tests whether your .avro reader handles unexpected EOF before byte 1,024.
- 2. What is the difference between testing a 0-byte .bin file and a mid-stream truncated .bin file?
- A 0-byte .bin file fails the initial minimum-size and None magic-byte check immediately, whereas a mid-stream truncated .bin file passes the header check and tests whether your .bin reader handles unexpected EOF before byte 1,024.
- 3. What is the difference between testing a 0-byte .bmp file and a mid-stream truncated .bmp file?
- A 0-byte .bmp file fails the initial minimum-size and 42 4D magic-byte check immediately, whereas a mid-stream truncated .bmp file passes the header check and tests whether your .bmp reader handles unexpected EOF before byte 10,240.
- 4. What is the difference between testing a 0-byte .css file and a mid-stream truncated .css file?
- A 0-byte .css file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .css file passes the header check and tests whether your .css reader handles unexpected EOF before byte 1,024.
- 5. What is the difference between testing a 0-byte .csv file and a mid-stream truncated .csv file?
- A 0-byte .csv file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .csv file passes the header check and tests whether your .csv reader handles unexpected EOF before byte 1,024.
- 6. What is the difference between testing a 0-byte .docx file and a mid-stream truncated .docx file?
- A 0-byte .docx file fails the initial minimum-size and 50 4B 03 04 magic-byte check immediately, whereas a mid-stream truncated .docx file passes the header check and tests whether your .docx reader handles unexpected EOF before byte 51,200.
- 7. What is the difference between testing a 0-byte .eml file and a mid-stream truncated .eml file?
- A 0-byte .eml file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .eml file passes the header check and tests whether your .eml reader handles unexpected EOF before byte 1,024.
- 8. What is the difference between testing a 0-byte .epub file and a mid-stream truncated .epub file?
- A 0-byte .epub file fails the initial minimum-size and 50 4B 03 04 magic-byte check immediately, whereas a mid-stream truncated .epub file passes the header check and tests whether your .epub reader handles unexpected EOF before byte 10,240.
- 9. What is the difference between testing a 0-byte .flac file and a mid-stream truncated .flac file?
- A 0-byte .flac file fails the initial minimum-size and 66 4C 61 43 magic-byte check immediately, whereas a mid-stream truncated .flac file passes the header check and tests whether your .flac reader handles unexpected EOF before byte 102,400.
- 10. What is the difference between testing a 0-byte .geojson file and a mid-stream truncated .geojson file?
- A 0-byte .geojson file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .geojson file passes the header check and tests whether your .geojson reader handles unexpected EOF before byte 1,024.
- 11. What is the difference between testing a 0-byte .gif file and a mid-stream truncated .gif file?
- A 0-byte .gif file fails the initial minimum-size and 47 49 46 38 39 61 magic-byte check immediately, whereas a mid-stream truncated .gif file passes the header check and tests whether your .gif reader handles unexpected EOF before byte 10,240.
- 12. What is the difference between testing a 0-byte .gltf file and a mid-stream truncated .gltf file?
- A 0-byte .gltf file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .gltf file passes the header check and tests whether your .gltf reader handles unexpected EOF before byte 1,024.
- 13. What is the difference between testing a 0-byte .gpx file and a mid-stream truncated .gpx file?
- A 0-byte .gpx file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .gpx file passes the header check and tests whether your .gpx reader handles unexpected EOF before byte 1,024.
- 14. What is the difference between testing a 0-byte .gz file and a mid-stream truncated .gz file?
- A 0-byte .gz file fails the initial minimum-size and 1F 8B 08 magic-byte check immediately, whereas a mid-stream truncated .gz file passes the header check and tests whether your .gz reader handles unexpected EOF before byte 1,024.
- 15. What is the difference between testing a 0-byte .html file and a mid-stream truncated .html file?
- A 0-byte .html file fails the initial minimum-size and 3C 21 44 4F 43 54 59 50 45 magic-byte check immediately, whereas a mid-stream truncated .html file passes the header check and tests whether your .html reader handles unexpected EOF before byte 1,024.
- 16. What is the difference between testing a 0-byte .ico file and a mid-stream truncated .ico file?
- A 0-byte .ico file fails the initial minimum-size and 00 00 01 00 magic-byte check immediately, whereas a mid-stream truncated .ico file passes the header check and tests whether your .ico reader handles unexpected EOF before byte 42,424.
- 17. What is the difference between testing a 0-byte .ics file and a mid-stream truncated .ics file?
- A 0-byte .ics file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .ics file passes the header check and tests whether your .ics reader handles unexpected EOF before byte 1,024.
- 18. What is the difference between testing a 0-byte .ini file and a mid-stream truncated .ini file?
- A 0-byte .ini file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .ini file passes the header check and tests whether your .ini reader handles unexpected EOF before byte 1,024.
- 19. What is the difference between testing a 0-byte .jpg file and a mid-stream truncated .jpg file?
- A 0-byte .jpg file fails the initial minimum-size and FF D8 FF magic-byte check immediately, whereas a mid-stream truncated .jpg file passes the header check and tests whether your .jpg reader handles unexpected EOF before byte 1,024.
- 20. What is the difference between testing a 0-byte .js file and a mid-stream truncated .js file?
- A 0-byte .js file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .js file passes the header check and tests whether your .js reader handles unexpected EOF before byte 1,024.
- 21. What is the difference between testing a 0-byte .json file and a mid-stream truncated .json file?
- A 0-byte .json file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .json file passes the header check and tests whether your .json reader handles unexpected EOF before byte 1,024.
- 22. What is the difference between testing a 0-byte .jsonl file and a mid-stream truncated .jsonl file?
- A 0-byte .jsonl file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .jsonl file passes the header check and tests whether your .jsonl reader handles unexpected EOF before byte 1,024.
- 23. What is the difference between testing a 0-byte .kml file and a mid-stream truncated .kml file?
- A 0-byte .kml file fails the initial minimum-size and UTF-8 text magic-byte check immediately, whereas a mid-stream truncated .kml file passes the header check and tests whether your .kml reader handles unexpected EOF before byte 1,024.
Part 4: Verification, edge cases and automation questions
- 1. How do checksums inside .avro containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .avro, while the outer SHA-256 digest (a53b9283c084120f… for sample-avro-1kb.avro) verifies every single byte of the file.
- 2. How do checksums inside .bin containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .bin, while the outer SHA-256 digest (bb174eca55fcab7b… for sample-bin-1kb.bin) verifies every single byte of the file.
- 3. How do checksums inside .bmp containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .bmp, while the outer SHA-256 digest (d7833ceeb6df6a3f… for sample-bmp-10kb.bmp) verifies every single byte of the file.
- 4. How do checksums inside .css containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .css, while the outer SHA-256 digest (d66dd341e097bfbf… for sample-css-1kb.css) verifies every single byte of the file.
- 5. How do checksums inside .csv containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .csv, while the outer SHA-256 digest (cdddf7fab2967f74… for sample-csv-1kb.csv) verifies every single byte of the file.
- 6. How do checksums inside .docx containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .docx, while the outer SHA-256 digest (f035af1f12c5f378… for sample-docx-50kb.docx) verifies every single byte of the file.
- 7. How do checksums inside .eml containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .eml, while the outer SHA-256 digest (fcb83c22ab1b25f4… for sample-eml-1kb.eml) verifies every single byte of the file.
- 8. How do checksums inside .epub containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .epub, while the outer SHA-256 digest (7aeb3a14b30fc59f… for sample-epub-10kb.epub) verifies every single byte of the file.
- 9. How do checksums inside .flac containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .flac, while the outer SHA-256 digest (7d5b1004d60d26ed… for sample-flac-100kb.flac) verifies every single byte of the file.
- 10. How do checksums inside .geojson containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .geojson, while the outer SHA-256 digest (9be0172ddbe0d3f7… for sample-geojson-1kb.geojson) verifies every single byte of the file.
- 11. How do checksums inside .gif containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .gif, while the outer SHA-256 digest (66c85de4a8d004e4… for sample-gif-10kb.gif) verifies every single byte of the file.
- 12. How do checksums inside .gltf containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .gltf, while the outer SHA-256 digest (00005d45316577b7… for sample-gltf-1kb.gltf) verifies every single byte of the file.
- 13. How do checksums inside .gpx containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .gpx, while the outer SHA-256 digest (753bd5be3339a3bc… for sample-gpx-1kb.gpx) verifies every single byte of the file.
- 14. How do checksums inside .gz containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .gz, while the outer SHA-256 digest (d67bc6e2b98c4e46… for sample-gz-1kb.gz) verifies every single byte of the file.
- 15. How do checksums inside .html containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .html, while the outer SHA-256 digest (eabca5a92fca425f… for sample-html-1kb.html) verifies every single byte of the file.
- 16. How do checksums inside .ico containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .ico, while the outer SHA-256 digest (144845a0b3fecb0e… for sample-favicon.ico) verifies every single byte of the file.
- 17. How do checksums inside .ics containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .ics, while the outer SHA-256 digest (b53dd9960c400e35… for sample-ics-1kb.ics) verifies every single byte of the file.
- 18. How do checksums inside .ini containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .ini, while the outer SHA-256 digest (58c71755af8a90ba… for sample-ini-1kb.ini) verifies every single byte of the file.
- 19. How do checksums inside .jpg containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .jpg, while the outer SHA-256 digest (8ee87ac7e59dde63… for sample-jpg-1kb.jpg) verifies every single byte of the file.
- 20. How do checksums inside .js containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .js, while the outer SHA-256 digest (3555814484c57fa1… for sample-js-1kb.js) verifies every single byte of the file.
- 21. How do checksums inside .json containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .json, while the outer SHA-256 digest (e6b79ec0b9d43a78… for sample-json-1kb.json) verifies every single byte of the file.
- 22. How do checksums inside .jsonl containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .jsonl, while the outer SHA-256 digest (c68974416de0b42c… for sample-jsonl-1kb.jsonl) verifies every single byte of the file.
- 23. How do checksums inside .kml containers compare against an outer SHA-256 file hash?
- Format-internal checksums (such as CRC-32 in PNG/ZIP/GZ/OGG or MD5 in FLAC) detect localized chunk corruption inside .kml, while the outer SHA-256 digest (405296fc546173a0… for sample-kml-1kb.kml) verifies every single byte of the file.
Explore all 40 topic-based technical format references
Browse the complete engineering reference library on Testing guides or Frequently asked questions.