-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solid 7z file use archive.read_bytes(am.name)[12:21] == b'somebyte' will get py7zr.exceptions.CrcError #2
Comments
Is it an archivefile issue or is it a py7zr issue? Can you check if you get the same issue when using py7zr on it's own? |
py7zr no problem
|
If you can give me steps to reproduce this, I can probably look into fixing this |
just use 7-Zip compress some file use read_bytes(am.name)[12:21] |
problem 7z file inside this zip file. |
I'll take another look |
@kokutoukiritsugu I fixed it in #3. Would be nice if you could test it and let me know before I merge and release |
function ok, but speed slow in a lot of file in 7z...
vs
|
You can do |
i try, use 6.49850606918335 vs 0.5358200073242188 yes, read_bytes not best suitable for warpper |
That's slower than I expected. Anyway that's something I'll look into now but not really an immediate goal. I'll close this issue when I merge #3 |
ok |
#4 is pretty much a complete re-write which does end up speeding things up a bit from time import perf_counter
import archivefile
import py7zr
file = "3月1.7z"
start = perf_counter()
with archivefile.ArchiveFile(file) as archive:
for member in archive.get_members():
if member.is_file:
archive.read_bytes(member)
print(perf_counter() - start)
start = perf_counter()
with py7zr.SevenZipFile(file) as archive:
for name, bio in archive.read().items():
if not name.endswith("/"):
bio.read()
print(perf_counter() - start)
Although it will never beat the underlying library for obvious reasons, think I'm happy with the minor improvements |
solid 7z file will get error.
non-solid 7z file no problem.
The text was updated successfully, but these errors were encountered: