A few notes on the classes/structs: nsZipArchive represents a single Zip file, and maintains an index of all the items in the file. nsZipItem represents a single item (file) in the Zip archive. nsZipFind represents the metadata involved in doing a search, and current state of the iteration of found objects.
There is a lot of ifdef STANDALONE here, and that is so that these basic structures can be reused in a standalone static library. In order for the code to be reused, these structures should never use anything from XPCOM, including such obvious things as NS_ASSERTION(). Instead, use the basic NSPR equivalents.
There is one key difference in the way that this code behaves in STANDALONE mode. The nsZipArchive owns a single file descriptor and that is used to read the ZIP file index, and for 'Test' and 'Extract'. Since there is only one nsZipArchive per file, you can only Test/Extract one file at a time from the Zip file. 'MT''safe' reading from the zipfile is performed through JARInputStream, which maintains its own file descriptor, allowing for multiple reads concurrently from the same zip file. nsZipItem -- a helper struct for nsZipArchive
each nsZipItem represents one file in the archive and all the information needed to manipulate it.