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

Function all_byte_values

nodedb-codec/src/rans.rs:394–400  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

392
393 #[test]
394 fn all_byte_values() {
395 // All 256 byte values present.
396 let data: Vec<u8> = (0..=255u8).cycle().take(4096).collect();
397 let encoded = encode(&data);
398 let decoded = decode(&encoded).unwrap();
399 assert_eq!(decoded, data);
400 }
401
402 #[test]
403 fn skewed_distribution() {

Callers

nothing calls this directly

Calls 4

collectMethod · 0.80
encodeFunction · 0.70
decodeFunction · 0.70
takeMethod · 0.45

Tested by

no test coverage detected