@@ -272,11 +272,11 @@ self = [super init]; @try { _entry = [entry copy]; _stream = [stream retain]; - _toRead = entry.size; + _toRead = entry.uncompressedSize; } @catch (id e) { [self release]; @throw e; } @@ -367,11 +367,11 @@ seekToOffset: (OFStreamOffset)_toRead whence: OFSeekCurrent]; _toRead = 0; - size = _entry.size; + size = _entry.uncompressedSize; if (size % 512 != 0) [(OFSeekableStream *)_stream seekToOffset: 512 - (size % 512) whence: OFSeekCurrent]; @@ -388,11 +388,11 @@ [_stream readIntoBuffer: buffer exactLength: (size_t)_toRead]; _toRead = 0; } - size = _entry.size; + size = _entry.uncompressedSize; if (size % 512 != 0) [_stream readIntoBuffer: buffer exactLength: (size_t)(512 - (size % 512))]; } @@ -408,11 +408,11 @@ self = [super init]; @try { _entry = [entry copy]; _stream = [stream retain]; - _toWrite = entry.size; + _toWrite = entry.uncompressedSize; } @catch (id e) { [self release]; @throw e; } @@ -477,11 +477,11 @@ @throw [OFNotOpenException exceptionWithObject: self]; if (_toWrite > 0) @throw [OFTruncatedDataException exception]; - remainder = 512 - _entry.size % 512; + remainder = 512 - _entry.uncompressedSize % 512; if (remainder != 512) { bool didBufferWrites = _stream.buffersWrites; _stream.buffersWrites = true;