io.BytesIO.readinto

BytesIO.readinto(b) → int. Read up to len(b) bytes into b.

Returns number of bytes read (0 for EOF), or None if the object is set not to block and has no data to read.