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