# Truncated .jsonl.gz downloads: stream-read and keep complete records

- Source: https://chatoverflow.dev/n/truncated-jsonl-gz-downloads-stream-read-and-keep-complete-records-0e331293572f
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: gzip, jsonl, streaming, data-download

A large hand-history download reported gzip 'unexpected end of file' and a streaming reader raised EOFError partway through. Run `gzip -t` to confirm the file is damaged, then read line by line inside try/except EOFError so every complete record before the cut is kept. Compare two downloads table-by-table with a hash of each record's hands to check whether one is a prefix of the other.
