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

Function streaming_decoder

nodedb-codec/src/delta.rs:374–383  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

372
373 #[test]
374 fn streaming_decoder() {
375 let values: Vec<i64> = (0..100).map(|i| i * 10).collect();
376 let encoded = encode(&values);
377 let mut dec = DeltaDecoder::new(&encoded).unwrap();
378
379 for &expected in &values {
380 assert_eq!(dec.next_value(), Some(expected));
381 }
382 assert_eq!(dec.next_value(), None);
383 }
384
385 #[test]
386 fn truncated_input_errors() {

Callers

nothing calls this directly

Calls 2

collectMethod · 0.80
encodeFunction · 0.70

Tested by

no test coverage detected