mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
Correctly detect bzip2 compressed streams with blocksizes other than 900k.
This commit is contained in:
parent
22da68b1b0
commit
9a38863d8c
3 changed files with 21 additions and 1 deletions
|
@ -627,7 +627,7 @@ class _StreamProxy(object):
|
|||
def getcomptype(self):
|
||||
if self.buf.startswith("\037\213\010"):
|
||||
return "gz"
|
||||
if self.buf.startswith("BZh91"):
|
||||
if self.buf[0:3] == "BZh" and self.buf[4:10] == "1AY&SY":
|
||||
return "bz2"
|
||||
return "tar"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue