fn drain_helper(buf: &mut [u8], pending_bytes: &mut Vec<u8>) -> usize
Helper: pull bytes off the front of pending_bytes and put them onto `buf. Return the number of bytes moved.
pending_bytes