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

Function single_string

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

Source from the content-addressed store, hash-verified

378
379 #[test]
380 fn single_string() {
381 let strings: Vec<&[u8]> = vec![b"hello world"];
382 let encoded = encode(&strings);
383 let decoded = decode(&encoded).unwrap();
384 assert_eq!(decoded.len(), 1);
385 assert_eq!(decoded[0], b"hello world");
386 }
387
388 #[test]
389 fn multiple_strings_roundtrip() {

Callers

nothing calls this directly

Calls 2

encodeFunction · 0.70
decodeFunction · 0.70

Tested by

no test coverage detected