pub fn bencode_limited(
    max_depth: usize,
    i: &[u8]
) -> Result<&[u8], (Bencode,), Error>
Expand description

parse a buffer containing bencode

the function stops parsing bencode if more than max_depth nested items are encountered