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
use bytesbox::*;
#[test]
fn insert_new_key_value() {
    let mut byte_box = ByteBox::prealloc(1);

    let key1 = b"key1";
    let val1 = b"value1";

    byte_box.insert(key1, val1);

    assert_eq!(byte_box.get(key1), Some(&val1[..]));
}

#[test]
fn insert_update_value() {
    let mut byte_box = ByteBox::prealloc(1);

    let key1 = b"key1";
    let val1 = b"value1";

    byte_box.insert(key1, val1);

    assert_eq!(byte_box.get(key1), Some(&val1[..]));

    let updated = b"value updated";
    assert!(!byte_box.insert(key1, b"value updated"));
    assert_eq!(byte_box.get(key1), Some(&updated[..]));
}