Index: src/OFZIPArchive.h ================================================================== --- src/OFZIPArchive.h +++ src/OFZIPArchive.h @@ -62,13 +62,13 @@ /*! * @brief Returns the entries of the central directory of the archive as an * array of objects of class @ref OFZIPArchiveEntry. * - * The array is sorted by the offset of the local file header, smallest offset - * to largest offset. This way, hard disk seeks are minimized when the array is - * enumerated to extract all files of the archive. + * The objects of the array have the same order as the entries in the central + * directory, which does not need to be the order in which the actual files are + * stored. * * @return The entries of the central directory of the archive as an array */ - (OFArray*)entries; Index: src/OFZIPArchive.m ================================================================== --- src/OFZIPArchive.m +++ src/OFZIPArchive.m @@ -331,11 +331,10 @@ [_entries addObject: entry]; [_pathToEntryMap setObject: entry forKey: [entry fileName]]; } - [_entries sort]; [_entries makeImmutable]; [_pathToEntryMap makeImmutable]; objc_autoreleasePoolPop(pool); } Index: src/OFZIPArchiveEntry.m ================================================================== --- src/OFZIPArchiveEntry.m +++ src/OFZIPArchiveEntry.m @@ -249,23 +249,6 @@ - (uint64_t)OF_localFileHeaderOffset { return _localFileHeaderOffset; } - -- (of_comparison_result_t)compare: (id)object -{ - OFZIPArchiveEntry *entry; - - if (![object isKindOfClass: [OFZIPArchiveEntry class]]) - @throw [OFInvalidArgumentException exception]; - - entry = object; - - if (_localFileHeaderOffset > entry->_localFileHeaderOffset) - return OF_ORDERED_DESCENDING; - if (_localFileHeaderOffset < entry->_localFileHeaderOffset) - return OF_ORDERED_ASCENDING; - - return OF_ORDERED_SAME; -} @end