@@ -93,10 +93,20 @@ - (OFString*)fileComment { OF_GETTER(_fileComment, true) } + +- (off_t)compressedSize +{ + return _compressedSize; +} + +- (off_t)uncompressedSize +{ + return _uncompressedSize; +} - (OFDate*)modificationDate { void *pool = objc_autoreleasePoolPush(); uint_fast16_t year = ((_lastModifiedFileDate & 0xFE00) >> 9) + 1980; @@ -118,24 +128,37 @@ objc_autoreleasePoolPop(pool); return [date autorelease]; } -- (off_t)uncompressedSize -{ - return _uncompressedSize; -} - -- (off_t)compressedSize -{ - return _compressedSize; -} - - (uint32_t)CRC32 { return _CRC32; } + +- (OFString*)description +{ + void *pool = objc_autoreleasePoolPush(); + OFDate *modificationDate = [self modificationDate]; + OFString *ret; + + ret = [[OFString alloc] initWithFormat: @"<%@: %p\n" + @"\tFile name = %@\n" + @"\tFile comment = %@\n" + @"\tCompressed size = %jd\n" + @"\tUncompressed size = %jd\n" + @"\tModification date = %@\n" + @"\tCRC32 = %" @PRIu32 @"\n" + @"}", + [self class], self, _fileName, _fileComment, + (intmax_t)_compressedSize, (intmax_t)_uncompressedSize, + modificationDate, _CRC32]; + + objc_autoreleasePoolPop(pool); + + return [ret autorelease]; +} - (uint16_t)OF_madeWithVersion { return _madeWithVersion; }