You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Documentation (https://py7zr.readthedocs.io/en/latest/py7zr.html#py7zr.SevenZipFile.testzip) says there is a testzip() method on SevenZipFile that returns the name of the first corrupt file or None. There isn't. There is a test() method that return True if the file is not corrupt or False if it is
To Reproduce
Steps to reproduce the behavior:
(example)
Run following code with python3.
'
import py7zr
archive = py7zr.SevenZipFile('test.7z','w')
archive.testzip()
'
see error
Expected behavior
Either add the method (which I think would be a good idea as that is what the zipfile module does) or correct the docs.
Environment (please complete the following information):
OS: Ubuntu Linux 20.04
Python 3.8
py7zr version: 0.7.1
The text was updated successfully, but these errors were encountered:
There is a point to discuss an API and behavior.
7-zip specification defines 2 digests.
packinfo digests -- digest of compressed data, it can be checked w/o extracting. (optional)
unpackinfo digests -- crc32 of uncompressed files. it is necessary to extract to check it. (exist in default)
py7zr try to check both in current implementation, check (1) first then check (2).
It may be able to split these two digests check to two methods, such as .test() for (1) and .testzip() for (2). There has already existed internal functions; _test_pack_digests() and _test_unpack_digests()
On ZIP archive, there are CRC32 of uncompressed files only, that is as same as unpack digest in 7zip.
Now I found a current implementation does not actually not checking CRC32 of each file.
There is only a code for checking folder digest (optional field) and header crcs(that working).
Describe the bug
Documentation (https://py7zr.readthedocs.io/en/latest/py7zr.html#py7zr.SevenZipFile.testzip) says there is a
testzip()
method onSevenZipFile
that returns the name of the first corrupt file orNone
. There isn't. There is atest()
method that returnTrue
if the file is not corrupt orFalse
if it isTo Reproduce
Steps to reproduce the behavior:
(example)
'
import py7zr
archive = py7zr.SevenZipFile('test.7z','w')
archive.testzip()
'
Expected behavior
Either add the method (which I think would be a good idea as that is what the
zipfile
module does) or correct the docs.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: