Index: src/OFZIPArchiveEntry+Private.h ================================================================== --- src/OFZIPArchiveEntry+Private.h +++ src/OFZIPArchiveEntry+Private.h @@ -24,11 +24,11 @@ - (uint16_t)OF_minVersion; - (uint16_t)OF_generalPurposeBitFlag; - (uint16_t)OF_compressionMethod; - (uint16_t)OF_lastModifiedFileTime; - (uint16_t)OF_lastModifiedFileDate; -- (OFDataArray*)OF_extraField; +- (OFDataArray*)OF_extraFieldNoCopy; - (uint16_t)OF_startDiskNumber; - (uint16_t)OF_internalAttributes; - (uint32_t)OF_externalAttributes; - (uint32_t)OF_localFileHeaderOffset; @end Index: src/OFZIPArchiveEntry.h ================================================================== --- src/OFZIPArchiveEntry.h +++ src/OFZIPArchiveEntry.h @@ -43,10 +43,11 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, copy) OFString *fileName, *fileComment; @property (readonly) off_t compressedSize, uncompressedSize; @property (readonly, retain) OFDate *modificationDate; @property (readonly) uint32_t CRC32; +@property (readonly, copy) OFDataArray *extraField; #endif /*! * @brief Returns the file name of the entry. * @@ -86,6 +87,13 @@ * @brief Returns the CRC32 checksum of the entry's file. * * @return The CRC32 checksum of the entry's file */ - (uint32_t)CRC32; + +/*! + * @brief Returns the extra field of the entry. + * + * @return The extra field of the entry + */ +- (OFDataArray*)extraField; @end Index: src/OFZIPArchiveEntry.m ================================================================== --- src/OFZIPArchiveEntry.m +++ src/OFZIPArchiveEntry.m @@ -133,10 +133,15 @@ - (uint32_t)CRC32 { return _CRC32; } + +- (OFDataArray*)extraField +{ + return [[_extraField copy] autorelease]; +} - (OFString*)description { void *pool = objc_autoreleasePoolPush(); OFDate *modificationDate = [self modificationDate]; @@ -147,14 +152,15 @@ @"\tFile comment = %@\n" @"\tCompressed size = %jd\n" @"\tUncompressed size = %jd\n" @"\tModification date = %@\n" @"\tCRC32 = %" @PRIu32 @"\n" + @"\tExtra field = %@\n" @"}", [self class], self, _fileName, _fileComment, (intmax_t)_compressedSize, (intmax_t)_uncompressedSize, - modificationDate, _CRC32]; + modificationDate, _CRC32, _extraField]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } @@ -187,11 +193,11 @@ - (uint16_t)OF_lastModifiedFileDate { return _lastModifiedFileDate; } -- (OFDataArray*)OF_extraField +- (OFDataArray*)OF_extraFieldNoCopy { OF_GETTER(_extraField, true) } - (uint16_t)OF_startDiskNumber