You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Cargo.toml
+4-10Lines changed: 4 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -3,28 +3,21 @@ name = "compressed-intvec"
3
3
version = "0.5.0"
4
4
edition = "2021"
5
5
authors = ["Luca Lombardo"]
6
-
description = "A compressed integer vector with fast random access that stores values with instantaneous codes in a bitstream"
6
+
description = "Space-efficient integer vectors for Rust. Offers a fixed-width implementation for O(1) mutable and atomic access, and a variable-width implementation that uses instantaneous codes and sampling for high compression ratios on non-uniform data."
### `arch-dependent-storable`: Storing `usize` and `isize`
417
+
418
+
By default, [`variable::IntVec`] only supports integer types with a fixed size (e.g., `u32`, `i64`). This guarantees that compressed data is portable across different machine architectures (e.g., from a 64-bit server to a 32-bit embedded device).
419
+
420
+
The `arch-dependent-storable` feature flag enables [`Storable`] implementations for `usize` and `isize`. When activated, you can create an `IntVec<usize>` directly.
421
+
422
+
**Warning**: This feature breaks data portability. An `IntVec<usize>` created on a 64-bit system containing values larger than `u32::MAX` will cause a panic if deserialized or read on a 32-bit system. Only enable this feature if you can guarantee that your application and its data will only ever run on a single target architecture (e.g., `x86_64`).
423
+
424
+
Enable it in your `Cargo.toml`:
425
+
```toml
426
+
compressed-intvec = { version = "0.5.0", features = ["arch-dependent-storable"] }
0 commit comments