[][src]Crate noodle

Provides byte stream parsing utilities.

This example is not tested

let reader = File::open("..."); // reader is anything that implements io::Read
let alloc_size = 1000;  // Set custom allocation size
let muncher = ReadMuncher::<DataItem, _>::new(&reader, alloc_size, |bytes, is_eof| {
    // parse function here

for packet in &muncher {
     // packet is DataItem



Continuously reads bytes from a Read implementor, parses that byte stream with the provided parser function, and provides an iterator over the parsed slices/packets/frames.

Type Definitions


Output type for ReadMuncher parse function