![]() |
|
Just another Perl shrine | |
PerlMonks |
Re: File integrity checkerby no_slogan (Deacon) |
on Aug 24, 2017 at 16:21 UTC ( #1197942=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|