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

Function empty_strings

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

Source from the content-addressed store, hash-verified

462
463 #[test]
464 fn empty_strings() {
465 let strings: Vec<&[u8]> = vec![b"", b"hello", b"", b"world", b""];
466 let encoded = encode(&strings);
467 let decoded = decode(&encoded).unwrap();
468 assert_eq!(decoded.len(), 5);
469 assert!(decoded[0].is_empty());
470 assert_eq!(decoded[1], b"hello");
471 assert!(decoded[2].is_empty());
472 }
473
474 #[test]
475 fn delimited_roundtrip() {

Callers

nothing calls this directly

Calls 2

encodeFunction · 0.70
decodeFunction · 0.70

Tested by

no test coverage detected