Basically what the title says.
A suggestion for the method:
def read_bytes(self, size: int | None = -1, offset: int | None = 0):
with self.open(mode='rb', buffering=0) as f:
if offset:
f.seek(offset)
return f.read(size)