|
1 | 1 | # Changelog |
2 | 2 |
|
3 | 3 | ## Unreleased |
4 | | -- Added `WaveletMatrix::to_bytes` and `WaveletMatrix::from_bytes` returning metadata and bytes for zero-copy persistence. |
5 | | -- Documented the serialized `WaveletMatrix` layout with ASCII art. |
6 | | -- Added `CompactVector::to_bytes` and `from_bytes` for zero-copy serialization. |
| 4 | +- Introduced a `Serializable` trait for metadata-based reconstruction and |
| 5 | + implemented it for `CompactVector`, `DacsByte`, and `WaveletMatrix`. |
| 6 | +- Audited `DacsByte` and `WaveletMatrix` to leverage `SectionHandle::view` |
| 7 | + during deserialization, removing legacy `slice_to_bytes` helpers and fully |
| 8 | + adopting the `ByteArea`-backed reconstruction path. |
| 9 | +- Switched internal bit-vector words and handles from `usize` to `u64`, removing |
| 10 | + unsafe handle transmutes in `WaveletMatrixBuilder` and fixing word size to |
| 11 | + 64-bit. |
| 12 | + - Reversed remaining layers and popped in `WaveletMatrixBuilder::freeze` |
| 13 | + to avoid repeated vector shifts. |
| 14 | + - `WaveletMatrixMeta` now stores a handle slice of per-layer handles, and |
| 15 | + `WaveletMatrixBuilder` allocates that slice from the `SectionWriter`. |
| 16 | + - `WaveletMatrixBuilder::with_capacity` records each layer's handle up front, |
| 17 | + eliminating handle assignment during `freeze`. |
| 18 | + - Switched to the zerocopy `SectionHandle` from `anybytes`, removing the |
| 19 | + interim `HandleRepr` shim. |
| 20 | + - Added `WaveletMatrixBuilder` for fixed-size construction, writing raw bits per |
| 21 | + layer and stably partitioning them on `freeze`; `WaveletMatrix::from_iter` |
| 22 | + now builds via this builder without requiring iterator cloning. |
| 23 | + - `WaveletMatrix` construction now goes through `from_iter`, which allocates |
| 24 | + layer bitvectors from a `SectionWriter` and consumes a single |
| 25 | + `ExactSizeIterator` without temporary `CompactVector` partitions. |
| 26 | + - `CompactVector::iter` now implements `ExactSizeIterator` to support the new |
| 27 | + constructor. |
| 28 | + - `WaveletMatrixBuilder::freeze` partitions layers in place, removing the |
| 29 | + temporary bit buffer previously used during construction. |
| 30 | + - Removed `order` and `next_order` buffers by sorting remaining layers in |
| 31 | + place during each `freeze` step. |
| 32 | + - Optimized `WaveletMatrixBuilder::freeze` using stable per-layer partitions |
| 33 | + and cycle-based permutations, reducing layer processing to linear time. |
| 34 | + - Replaced the `perm` array with a scratch `visited` bitmap and cycle |
| 35 | + rotations so each level permutes lower layers in place with only `O(n)` |
| 36 | + extra bits. |
| 37 | + - Stored row suffix bits in a `usize` during cycle rotations, removing the |
| 38 | + temporary `Vec<bool>` from `rotate_cycle_over_lower_levels`. |
| 39 | + - Reused `BitVectorBuilder` as the scratch `visited` bitmap for |
| 40 | + wavelet-matrix construction, eliminating the separate `BitArrayBuilder`. |
| 41 | + - Added `swap_bits` helper to `BitVectorBuilder` for in-place bit exchanges. |
| 42 | + - Reworked `WaveletMatrix::from_iter` to require a cloneable iterator and |
| 43 | + build layers in two passes without temporary buffers. |
| 44 | +- Rewrote `CompactVectorBuilder` to use fixed-size `set_int` and `set_ints` |
| 45 | + APIs, removing `push_int`/`extend` and updating builders and examples. |
| 46 | +- Added `with_capacity` constructor on `BitVectorBuilder` and honored capacity in |
| 47 | + `CompactVectorBuilder::with_capacity` to pre-allocate bit storage. |
| 48 | +- Replaced `BitVectorBuilder::new` with `with_capacity` that allocates from an |
| 49 | + `anybytes::ByteArea` section and plumbed `SectionWriter` through |
| 50 | + `CompactVectorBuilder` and wavelet matrix builders. |
| 51 | +- Builders now track capacity and error when pushes exceed the reserved size. |
7 | 52 | - Made `DacsByte` generic over its flag index type with a default of `Rank9SelIndex`. |
8 | 53 | - `DacsByte::from_slice` now accepts a generic index type, removing `from_slice_with_index`. |
9 | 54 | - Added `BitVectorBuilder` and zero-copy `BitVectorData` backed by `anybytes::View`. |
|
12 | 57 | - Rename crate from `succdisk` to `jerky`. |
13 | 58 | - Replaced the old `BitVector` with the generic `BitVector<I>` and renamed the |
14 | 59 | mutable variant to `RawBitVector`. |
15 | | -- Extended `BitVectorBuilder` with `push_bits` and `set_bit` APIs. |
| 60 | +- Replaced the push-based `BitVectorBuilder` with fixed-size `set_bit` and `set_bits` APIs and updated builders accordingly. |
| 61 | +- Added `set_bits_from_iter` to `BitVectorBuilder` and later revised it to take a |
| 62 | + start offset and consume bits until the iterator ends or the builder is |
| 63 | + full, leaving any unconsumed items to the caller. |
16 | 64 | - Added `from_bit` constructor on `BitVectorBuilder` for repeating a single bit. |
17 | 65 | - `DacsByte` now stores level data as zero-copy `View<[u8]>` values. |
18 | | -- Added `to_bytes` and `from_bytes` on `DacsByte` for zero-copy serialization. |
19 | | -- Documented the byte layout produced by `DacsByte::to_bytes` with ASCII art. |
| 66 | +- Replaced `to_bytes` helpers with `metadata` methods returning `SectionHandle`s |
| 67 | + so structures can be reconstructed zero-copy via `from_bytes`. |
| 68 | +- Documented the byte layout for `DacsByte` sequences with ASCII art. |
20 | 69 | - Switched `anybytes` dependency to track the upstream Git repository for the |
21 | 70 | latest changes. |
22 | 71 | - Removed internal byte buffers from data structures; `WaveletMatrix`, |
|
31 | 80 | - `Rank9Sel` now stores a `BitVector<Rank9SelIndex>` built via `BitVectorBuilder`. |
32 | 81 | - Replaced `DArrayFullIndex` with new `DArrayIndex` that uses const generics |
33 | 82 | to optionally include `select1` and `select0` support. |
34 | | -- Introduced `CompactVectorBuilder` mutable APIs `push_int`, `set_int`, and `extend`. |
| 83 | +- Introduced `CompactVectorBuilder` mutable APIs `set_int` and `set_ints`. |
35 | 84 | - Simplified bit vector imports by re-exporting `BitVectorBuilder` and `Rank9SelIndex` and updating examples. |
36 | 85 | - Moved the `bit_vector::bit_vector` module contents directly into `bit_vector` for cleaner paths. |
| 86 | +- Recorded future work items for a metadata serialization trait and |
| 87 | + ByteArea-backed documentation examples. |
37 | 88 | - Added README usage example demonstrating basic bit vector operations. |
38 | 89 | - Removed `bit_vector::prelude`; import traits directly with `use jerky::bit_vector::*`. |
39 | 90 | - Added `freeze()` on `CompactVectorBuilder` yielding an immutable `CompactVector` backed by `BitVector<NoIndex>`. |
40 | | -- `CompactVector::new` and `with_capacity` now return builders; other constructors build via the builder pattern. |
| 91 | +- Removed `CompactVector::new`; use `with_capacity` to construct builders. |
41 | 92 | - Wavelet matrix and DACs builders now use `BitVectorBuilder` for temporary bit |
42 | 93 | vectors, storing only immutable `BitVector` data after construction. |
43 | 94 | - Removed obsolete `RawBitVector` type. |
|
66 | 117 | - Documented `WaveletMatrix` usage in `README.md`. |
67 | 118 | - Moved README usage examples to runnable files in `examples/`. |
68 | 119 | - Added `compact_vector` example showing construction and retrieval. |
| 120 | +- Serialized `WaveletMatrix` and `DacsByte` directly into a `ByteArea` to |
| 121 | + avoid intermediate copies and guarantee contiguous layout. |
| 122 | +- Enabled doctests for `WaveletMatrix` by removing `ignore` fences from its |
| 123 | + documentation examples. |
| 124 | +- `DacsByte::from_slice` now writes level bytes and flags directly into |
| 125 | + `SectionWriter` buffers, removing the intermediate `Vec` allocations. |
| 126 | +- Stored per-level `DacsByte` handles in the byte arena, allowing |
| 127 | + `DacsByteMeta` to reference a single handle slice like `WaveletMatrixMeta`. |
| 128 | +- Expanded examples and README with `ByteArea`/`SectionHandle` metadata |
| 129 | + reconstruction for set-based APIs, adding a `dacs_byte` usage demo. |
0 commit comments