bzip2 · shipping · also .bz2

Bzip2

Bzip2 is a lossless compression format with independently compressed blocks, per-block CRCs and a combined stream CRC.

Related Observatory article: Bzip2 on hesela.com

Recovery: bzip2recover scans bit patterns and writes candidate one-block streams; bzip2 -t must validate each candidate. Successful splitting does not certify data or completeness. [1] [2]

Boundary damage: in a controlled four-block, 320000-byte fixture, a second-block marker bit left blocks 3 and 4 validated: 120039 bytes. An encoded-data bit instead left blocks 1, 3 and 4: 220020 bytes. A missing delimiter affected the preceding candidate too; this is scanner behavior, not irrecoverable loss. [3]

Stream checks: changing only the final CRC made the original fail while recovered blocks exactly reconstructed the input. Recovery creates new per-candidate framing. Original expectations, not candidate checks alone, establish completeness. [2] [3]

Preserve fragments and missing intervals separately. Candidate numbers and compressed-bit positions do not give original uncompressed offsets. Joining fragments across a gap changes higher-level records. [3]

Block order: the combined CRC rotates a 32-bit accumulator by one bit and XORs each block CRC. Positions 32 blocks apart have equal weights. Exchanging blocks 1 and 33 in a designed bzip2 1.0.8 stream kept all stored CRCs and length unchanged; testing and decoding passed with different bytes. No individual block collision was needed. Shorter swaps are not universally guaranteed detection. [2] [4]

Use a trusted whole-object digest or a manifest binding object, generation, position, length and digest. Unordered block hashes cannot establish order; authenticate the reference when tampering matters. [3]

Relations

related
Block-independent compression, Cyclic redundancy check, Gzip, Backup manifest, Restore test

Citations

  1. Julian Seward. bzip2 and libbzip2 1.0.8: sections 2.3, 2.5 and 2.6 (recovery). (accessed 2026-10-20)
  2. bzip2 1.0.8 official source release: bzip2recover.c, bzlib.c and compress.c. (accessed 2026-10-20)
  3. Hesela: six bzip2 corruption fixtures, validated fragments and missing intervals. (accessed 2026-10-20)
  4. Hesela: six designed native bzip2 block-order controls, source-visible rotate/XOR recurrence and exact-byte oracle. (accessed 2026-10-25)
Sources & caveats
  • Controlled synthetic observations on recorded bzip2/bzip2recover 1.0.8 binaries, not fault probabilities or a claim of irrecoverable loss. Pristine data supplied the original-byte map.
  • Runner: https://hesela.dev/research/bzip2-salvage.py ; results: https://hesela.dev/research/bzip2-salvage.json . Authored artifacts are CC0-1.0.
  • Order supplement: https://hesela.dev/research/bzip2-block-order/probe.py ; source hashes: https://hesela.dev/research/bzip2-block-order/sources.json . Two retained bzip2 1.0.8 builds are not independent implementations; current system replay agrees. No field frequency or global novelty claim.

JSON: /data/terms/bzip2.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Bzip2. Hesela. 2026-10-25. https://hesela.dev/terms/bzip2/