bytesbox 0.4.0

ByteBox is a high-performance hash map implementation optimized for byte slices. It efficiently maps keys and values of type Vec<u8>, providing full ownership of the data. ByteBox uses a custom hash function with linked-list-based collision handling, ensuring low memory overhead and optimal performance.
Documentation
1
2
3
4
5
6
7
8
9
use bytesbox::ByteBox;
#[test]
fn auto_resize() {
    let mut byte_box = ByteBox::prealloc(1);
    for i in 0..20 {
        byte_box.insert(format!("key{}", i).as_bytes(), b"value");
    }
    assert!(byte_box.allocation() > 16);
}