fn read_into_vec( reader: &mut impl Read, vec: &mut Vec<u8>, size: usize, ) -> Result<()>
Using the provided vec as a buffer, read exactly [size] bytes of content from [reader] into it. Any existing content in vec will be discarded; however its capacity will be reused, making this function suitable for use in loops.
vec
size
reader