Skip to content

v0.1.1 — CAS Deduplication, Multi-File Packing & Format Fixes

Choose a tag to compare

@byte271 byte271 released this 18 Feb 18:11
· 6 commits to main since this release

What's New in v0.1.1

This release introduces content-addressable storage (CAS), multi-file CLI
support, and several binary format corrections. It also restores backward
compatibility with v0.1.0 archives.

Important

v0.1.1 changes the binary format of the Superblock and DataBlock header.
Archives produced by v0.1.0 can still be read by v0.1.1,
but archives produced by v0.1.1 cannot be read by v0.1.0.


New Features

  • CAS Deduplication — Every block is identified by a BLAKE3 hash of its
    uncompressed content. When the same content is added more than once, the
    writer reuses the existing block and stores only a reference, reducing
    archive size with no decompression overhead on reads.

  • Multi-File Packing — pack now accepts any number of input paths in
    a single invocation:

  6cy pack file1.txt file2.bin image.png --output archive.6cy
  • Merkle Root Hash — The FileIndex now includes a BLAKE3 root hash over
    all block content hashes, enabling out-of-band integrity verification
    without reading block payloads. Visible via 6cy info.

Format Changes

  • Superblock: feature_bitmap replaced by two explicit fields —
    index_size: u64 and a variable-length required_codecs: [u16] list
    recording every codec ID present in the archive.
  • DataBlock header: codec_id widened from u8 to u16; new
    content_hash: [u8; 32] (BLAKE3) field appended. Both CRC32 (compressed)
    and BLAKE3 (uncompressed) are now verified on every read.
  • FileIndex: offsets: [u64] replaced by block_refs: [BlockRef],
    each carrying the block's content hash, archive offset, and an optional
    cross-archive ID field (reserved for v2).

Bug Fixes

  • Fixed a bug in optimize where the block offset was captured into a
    shadowed _current_offset variable and never stored in the index, causing
    all BlockRef offsets to be wrong after optimization.
  • Fixed deserialization failure (missing field 'offsets') when reading
    v0.1.0 archives with the new reader. The deserializer now accepts both
    the legacy offsets field and the current block_refs field and converts
    automatically.

Other Changes

  • 6cy list now shows a Blocks column with the first 4 bytes of each
    block's content hash.
  • 6cy info now shows Index Size, Required Codecs, and Root Hash
    in place of Feature Bitmap.
  • Benchmarks expanded: full pack/finalize cycle and CAS dedup overhead
    benchmarks added.
  • Integration tests expanded to cover roundtrip, multi-file, CAS dedup,
    LZ4 codec, deterministic root hash, and required-codecs tracking.
  • New dependencies: blake3 = "1.5", hex = "0.4".

Compatibility

Read v0.1.0 archives Write v0.1.0 archives
v0.1.1 ✅ (automatic conversion) ❌ (format updated)
v0.1.0 — ✅