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

Method block_count

nodedb-codec/src/lz4.rs:267–270  ·  view source on GitHub ↗

Number of blocks in the compressed data.

(data: &[u8])

Source from the content-addressed store, hash-verified

265
266 /// Number of blocks in the compressed data.
267 pub fn block_count(data: &[u8]) -> Result<usize, CodecError> {
268 let header = read_header(data)?;
269 Ok(header.block_count)
270 }
271}
272
273#[cfg(test)]

Callers

nothing calls this directly

Calls 1

read_headerFunction · 0.70

Tested by

no test coverage detected