MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / binary_data

Function binary_data

nodedb-codec/src/fsst.rs:455–461  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

453
454 #[test]
455 fn binary_data() {
456 // Binary data with no patterns — should still roundtrip (escape every byte).
457 let data: Vec<&[u8]> = vec![&[0, 1, 2, 3, 4, 255, 254, 253]];
458 let encoded = encode(&data);
459 let decoded = decode(&encoded).unwrap();
460 assert_eq!(decoded[0], data[0]);
461 }
462
463 #[test]
464 fn empty_strings() {

Callers

nothing calls this directly

Calls 2

encodeFunction · 0.70
decodeFunction · 0.70

Tested by

no test coverage detected