I want to inflate Microsoft office files using the zlib library. From what I have read, office files are just zip files with extensions like docx,xlsx etc. The unzip utility can actually decompress the files. Can I do the same with the zlib library?
zlib provides the basic machinery needed to decompress deflate data and to compute CRCs, which is most of what you need to decode zip files. However zlib does not provide zip file format decoding, i.e. decoding the headers, which you would need to wrap around the zlib calls for decompression and check value computation.
zlib does come with minizip, which is in the contrib directory of the source distribution, to do that job. You can also look at libzip or libarchive, which use zlib and which provide zip file functions.