in reply to File integrity checker
Would like to check the integrity of the file before attempting uncompression or extraction.There's not really any way to do this. Zip and gzip store checksums of the uncompressed contents; the -t options actually uncompress the file, calculate the checksum, and throw away the contents. You could do the same thing in your program, or you could uncompress to a tempfile and delete it if the checksum comes out bad.
Edit: There's a section about integrity checking in the Archive::Zip::FAQ.
|Replies are listed 'Best First'.|
Re^2: File integrity checker
by roperl (Beadle) on Aug 24, 2017 at 16:49 UTC