The zlib library distribution contains the directory 'contrib'. In it you will find a library called "minizip" (the same license as zlib itself), which has an API for creating (zip.h) and navigation / unpacking (unzip.h) ZIP files. Despite the file name, unzip.h has functions that allow you to browse or search files in a zip file without extracting it.
source share