Crate noodle

Source
Expand description

Provides byte stream parsing utilities.


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
}

Structs§

ReadMuncher
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 Aliases§

MunchOutput
Output type for ReadMuncher parse function