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

Function bytes_pipeline_roundtrip

nodedb-codec/src/pipeline.rs:502–509  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

500
501 #[test]
502 fn bytes_pipeline_roundtrip() {
503 let raw: Vec<u8> = (0..1000u32).flat_map(|i| i.to_le_bytes()).collect();
504 for codec in [ColumnCodec::Raw, ColumnCodec::Lz4] {
505 let encoded = encode_bytes_pipeline(&raw, codec).unwrap();
506 let decoded = decode_bytes_pipeline(&encoded, codec).unwrap();
507 assert_eq!(decoded, raw, "bytes pipeline {codec} failed");
508 }
509 }
510}

Callers

nothing calls this directly

Calls 3

encode_bytes_pipelineFunction · 0.85
decode_bytes_pipelineFunction · 0.85
collectMethod · 0.80

Tested by

no test coverage detected