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 | |
by pryrt (Abbot) on Aug 24, 2017 at 17:06 UTC | |
by Anonymous Monk on Aug 24, 2017 at 17:14 UTC | |
by no_slogan (Deacon) on Aug 24, 2017 at 17:37 UTC | |
by roperl (Beadle) on Aug 24, 2017 at 21:05 UTC | |
by roperl (Beadle) on Aug 24, 2017 at 18:42 UTC | |
by no_slogan (Deacon) on Aug 24, 2017 at 18:48 UTC |
In Section
Seekers of Perl Wisdom