What I need to do is unzip a file, (.gz or .z), read the first line and do some stuff according to the first line read. But the C standard library doesn’t seem to offer a way to do this.
Is the a platform-independent way to do it?
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.
Use “zlib”, the library that performs compression and decompression:
http://www.zlib.net/
It’s included in the base of all Unix distributions, and you can easily link your program against it for the windows version and ship the DLL.