Correctly detect bzip2 compressed streams with blocksizes other than 900k.

This commit is contained in:
Lars Gustäbel 2011-12-06 13:07:09 +01:00
parent 22da68b1b0
commit 9a38863d8c
3 changed files with 21 additions and 1 deletions

View file

@ -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"