Crates.io | compressed_collections |
lib.rs | compressed_collections |
version | 0.4.0 |
source | src |
created_at | 2023-01-04 17:25:51.048496 |
updated_at | 2023-01-04 17:25:51.048496 |
description | Collections which transparently compress data to reduce memory usage |
homepage | |
repository | https://github.com/maxconway/compressed_collections |
max_upload_size | |
id | 750970 |
size | 22,148 |
This create offers collections which automatically compress themselves, which reduces memory usage, sometimes substantially, allowing collections to be held in memory that would otherwise be too big.
The only restriction on the datatypes in the collections is that they must be serde serializable.
For instance:
use compressed_collections::Stack;
let mut compressed_stack = Stack::new();
for _ in 0..(1024 * 1024 * 100) {
compressed_stack.push(1);
}
This only allocates around 10MB (the default buffer size), whereas the equivalent vector would be around 100MB in size.
Design goals:
Datastructures:
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.