Skip to content

Commit 4355912

Browse files
authored
Use .read_bytes() instead (#325)
1 parent 2836c4a commit 4355912

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pyiceberg/avro/file.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ def _read_block(self) -> int:
194194
raise ValueError(f"Expected sync bytes {self.header.sync!r}, but got {sync_marker!r}")
195195
block_records = self.decoder.read_int()
196196

197-
block_bytes_len = self.decoder.read_int()
198-
block_bytes = self.decoder.read(block_bytes_len)
197+
block_bytes = self.decoder.read_bytes()
199198
if codec := self.header.compression_codec():
200199
block_bytes = codec.decompress(block_bytes)
201200

0 commit comments

Comments
 (0)