pub fn hash_from_outboard_encoded<C: Read, O: Read>(
    content_reader: &mut C,
    outboard_reader: &mut O
) -> Result<Hash>
Expand description

Given an outboard encoding beind two Read interfaces, quickly determine the root hash by reading just the root node.

Example

let input = b"foobar";
let (hash1, outboard) = bao::encode::encode_outboard_to_vec(input);
let hash2 = bao::decode::hash_from_outboard_encoded(&mut &input[..], &mut &*outboard).unwrap();
assert_eq!(hash1, hash2);