Skip to content

Commit b571c13

Browse files
committed
Fix header checks
1 parent 5298b1b commit b571c13

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/isal/igzip.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,6 @@ def _read_eof(self):
170170
# Gzip files can be padded with zeroes and still have archives.
171171
# Consume all zero bytes and set the file position to the first
172172
# non-zero byte. See http://www.gzip.org/#faq8
173-
# Also the isal_zlib.decompressobj does not consume the last two bytes
174-
# when using ISAL_GZIP_NO_HDR.
175-
for i in range(2):
176-
c = self._fp.read(1)
177-
if c == b"\x00":
178-
break
179173
c = b"\x00"
180174
while c == b"\x00":
181175
c = self._fp.read(1)

src/isal/isal_zlib.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ cdef wbits_to_flag_and_hist_bits_inflate(int wbits,
577577
crc_flag[0] = ISAL_DEFLATE
578578
elif 72 <=wbits <= 79:
579579
hist_bits[0] = wbits - 64
580-
crc_flag[0] = ISAL_GZIP_NO_HDR
580+
crc_flag[0] = ISAL_GZIP_NO_HDR_VER
581581
else:
582582
raise ValueError("Invalid wbits value")
583583

0 commit comments

Comments
 (0)