Rename read_length to read_uint16, and add a read_uint8.