-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
[Bug]: Split package preview and split compress package bug #150
Comments
Hi!
Did you open the archive using
I can reproduce the error. I'll fix this bug as soon as possible! |
I used BitFormat:: Split for preview and obtained content with only one item. In this situation, how should I continue previewing the content of this item? I think that in this situation, Bit7z should automatically help me obtain the content of this compressed package. Do you think this is more reasonable |
Unfortunately, it's not possible when opening the archive using
Bit7z does support automatically reading the content of the compressed package in a multi-volume archive, but you have to specify the compression format, rather than BitArchiveReader reader{ lib, "archive.7z.001", BitFormat::SevenZip };
// reader will directly read inside the whole 7z archive |
Thank you |
https://www.7-zip.org/a/7z2201-extra.7z |
Execution After _setmaxstdio (8192), when previewing compressed packets with more than 999 volumes, normal operation is possible
During these two days of debugging, it was found that the Stream could not be released normally, causing IO abnormalities |
Thanks for the debugging! Yeah, I actually noticed this issue while fixing the bug you initially reported here. The main problem is that bit7z keeps all the volume streams open until the compression/extraction operation finishes. This is actually the same behavior that 7-zip had before the latest v23.01 (still not supported by bit7z, by the way, but I'll work on it). Yesterday, I pushed two commits to the Ideally, the library should keep fewer streams opened, but this would require more code changes, so a cleaner fix will probably come after the v4 stable release.
Isn't this the same issue you initially reported? If so, I already fixed it on
I'll check this, thanks!
Could you give more info about this issue? |
Quick update: I just pushed a commit to |
OK, Thanks. I will Test |
compress and decompress 999 split packages the problem still exists. |
preview is ok |
Unfortunately, this time I cannot reproduce the problem. In my tests, bit7z handles archives with more than 2000 volumes just fine. |
Can you tell me if you can call the code for decompression and compression methods and let me see if it's my coding problem |
Compression: BitFileCompressor compressor{ lib, BitFormat::SevenZip };
/* Setting the volume size as 1/2048 of the uncompressed file size;
obviously, we will have less than 2048 volumes due to compression,
but they will still be more than 2000, at least in my case! */
compressor.setVolumeSize( file_size / 2048 );
compressor.compressFile( "path/to/file.exe", "multi_volume.7z" ); Extraction: BitArchiveReader reader{ lib, "multi_volume.7z.001", BitFormat::SevenZip };
// Output folder which will contain the original unsplit and uncompressed file.
reader.extractTo( "output/" ); alternatively BitFileExtractor extractor{ lib, BitFormat::SevenZip };
extractor.extract( "multi_volume.7z.001", "output/" ); |
bit7z version
4.0.x RC
Compilation options
BIT7Z_AUTO_FORMAT, BIT7Z_USE_NATIVE_STRING
7-zip version
v22.01
7-zip shared library used
7z.dll / 7z.so
Compilers
MSVC
Compiler versions
MSVC2017
Architecture
x86_64, x86
Operating system
Windows
Operating system versions
Windows 11
Bug description
1、Unable to obtain the file list of the partitioned compressed package using the BitArchiveReader class
2、When split compressing by package , if the number of packages exceeds 999, an error will be reported
Steps to reproduce
No response
Expected behavior
No response
Relevant compilation output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: