I am designing a zip-unzip utility using C. There is a crc-32 code field. Is it of compressed data or uncompressed data?
Share
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.
It is the CRC-32 of the uncompressed data. In other words, it would be the CRC-32 of the file’s original contents before being compressed. Zlib has a minizip contribution which is a small zip/unzip implementation written in C. In zip.c you can see in the function
zipWriteInFileInZipthat it is generating the crc of the buffer passed in that should contain the file’s original contents.