| Crates.io | palettevec |
| lib.rs | palettevec |
| version | 0.4.0 |
| created_at | 2025-01-05 21:27:11.623048+00 |
| updated_at | 2025-06-02 08:21:21.010709+00 |
| description | A palette compressed vector library for potentially insane runtime compression ratios. |
| homepage | |
| repository | https://github.com/alexdesander/palettevec |
| max_upload_size | |
| id | 1505065 |
| size | 101,008 |
PaletteVec is a Rust data structure designed for space-efficient storage of collections containing a limited number of unique, repeated elements. It achieves this by using a palette-based encoding scheme (palette compression), similar to how indexed color images or Minecraft chunk data are stored.
push, pop, set, and get directly on the compressed data without needing to decompress the entire collection.Palette and IndexBuffer traits, allowing for different storage strategies (e.g., HybridPalette for a balance of performance and memory, AlignedIndexBuffer for efficient index storage).PaletteVec is particularly useful in scenarios where:
Common Use Cases:
Vec<T>.HybridPalette implementation helps mitigate this by switching from an array to a HashMap when the number of unique items exceeds a threshold.Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.