How to find gzip file is empty using perl
a.txt.gz when i uncompress its empty
how to find the compress gz are empty ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t directly get the size of the uncompressed file, but you can use seek for it. Create an object from the file and try to seek to the first byte. If you can seek, then your file is at least 1 byte in size, otherwise it is empty.