We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 219f46b + 661d75a commit b48f8f1Copy full SHA for b48f8f1
pyiceberg/avro/codecs/snappy_codec.py
@@ -51,9 +51,9 @@ def compress(data: bytes) -> tuple[bytes, int]:
51
@staticmethod
52
def decompress(data: bytes) -> bytes:
53
# Compressed data includes a 4-byte CRC32 checksum
54
- data = data[0:-4]
+ checksum = data[-4:] # store checksum before truncating data
55
+ data = data[0:-4] # remove checksum from the data
56
uncompressed = snappy.decompress(data)
- checksum = data[-4:]
57
SnappyCodec._check_crc32(uncompressed, checksum)
58
return uncompressed
59
0 commit comments