equal
deleted
inserted
replaced
135 deltaheadersize = struct.calcsize(deltaheader) |
135 deltaheadersize = struct.calcsize(deltaheader) |
136 version = '01' |
136 version = '01' |
137 _grouplistcount = 1 # One list of files after the manifests |
137 _grouplistcount = 1 # One list of files after the manifests |
138 |
138 |
139 def __init__(self, fh, alg, extras=None): |
139 def __init__(self, fh, alg, extras=None): |
140 if alg == 'UN': |
140 if alg is None: |
141 alg = None # get more modern without breaking too much |
141 alg = 'UN' |
142 if not alg in util.decompressors: |
142 if alg not in util.compengines.supportedbundletypes: |
143 raise error.Abort(_('unknown stream compression type: %s') |
143 raise error.Abort(_('unknown stream compression type: %s') |
144 % alg) |
144 % alg) |
145 if alg == 'BZ': |
145 if alg == 'BZ': |
146 alg = '_truncatedBZ' |
146 alg = '_truncatedBZ' |
147 self._stream = util.decompressors[alg](fh) |
147 |
|
148 compengine = util.compengines.forbundletype(alg) |
|
149 self._stream = compengine.decompressorreader(fh) |
148 self._type = alg |
150 self._type = alg |
149 self.extras = extras or {} |
151 self.extras = extras or {} |
150 self.callback = None |
152 self.callback = None |
151 |
153 |
152 # These methods (compressed, read, seek, tell) all appear to only |
154 # These methods (compressed, read, seek, tell) all appear to only |