Closed miurahr closed 5 years ago
When inserting following line, the specific test case passed,. This may means it is enough to copy for last_coder
BCJ filter in the case.
--- a/py7zlib.py
+++ b/py7zlib.py
@@ -683,6 +683,7 @@ class ArchiveFile(Base):
self._file.seek(self._src_start)
input = self._file.read(total)
if is_last_coder and can_partial_decompress:
+ return input[self._start:self._start+size]
data = decompressor.decompress(input, self._start+size)
else:
data = decompressor.decompress(input)
Because BCJ filter is for x86 executables, p7zip may skip BCJ filter for text or other non exe files.
Thanks for reporting, BCJ2 streams are now supported.
py7zlib fails when attempting decompression test with an attached file testcase.tar.gz (please extract a 7z file from .tgz) , that is
test code
result
When observing call in
py7zlib:632 data = getattr(self, decoder)(coder, data, level, num_coders)
which called three times. In second call, it returnsdata =b'This file is located in a folder.This file is located in the root.'
which has already decoded and then 3rd call fails.