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
10
11
12
13
14
use bytesbox::ByteBox;

#[test]
fn clear() {
    let mut byte_box = ByteBox::new();
    byte_box.insert(b"dynamic-resizing", b"true");
    byte_box.insert_primitive(b"font-size", 54);

    assert_eq!(byte_box.len(), 2usize);

    byte_box.clear();

    assert_eq!(byte_box.len(), 0usize);
}