rikyoz / bit7z

A C++ static library offering a clean and simple interface to the 7-zip shared libraries.
https://rikyoz.github.io/bit7z
Mozilla Public License 2.0
627 stars 114 forks source link

How to check archive file is valid before extract? #15

Closed hcaihao closed 6 years ago

hcaihao commented 6 years ago

And how to determine archive file format, such as a .rar file is RAR or RAR5?

rikyoz commented 6 years ago

Checking if an archive is valid In the new version v3.0.0, you can use the BitExtractor::test method, which tests the input archive without extracting it and throws a BitException if it is not valid. Earlier versions of bit7z (<=2.1) do not support archive testing.

Determining the archive file format See issue #16

hcaihao commented 6 years ago

Got it! thank you!

rikyoz commented 6 years ago

You're welcome!