pub fn read_frame(input: &mut impl Read, max: usize) -> Result<Option<Vec<u8>>>
The next frame, None at a clean end of input, and an error for a frame past max bytes, which is never read.
None
max