Differences From Artifact [6109b2512a]:
- File
src/OFZIPArchive.m
— part of check-in
[aa1bb213e0]
at
2015-05-09 21:29:43
on branch trunk
— OFZIPArchive: Remove OFFile requirement
Every OFSeekableStream can be used now. (user: js, size: 13896) [annotate] [blame] [check-ins using]
To Artifact [d48f1a83ef]:
- File src/OFZIPArchive.m — part of check-in [85c16c3a42] at 2015-05-10 21:48:46 on branch trunk — OFZIPArchive_FileStream: Add _closed ivar (user: js, size: 13909) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
71 72 73 74 75 76 77 | @interface OFZIPArchive_FileStream: OFStream { OFStream *_stream, *_decompressedStream; OFZIPArchive_LocalFileHeader *_localFileHeader; bool _hasDataDescriptor; uint64_t _size; uint32_t _CRC32; | | | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | @interface OFZIPArchive_FileStream: OFStream { OFStream *_stream, *_decompressedStream; OFZIPArchive_LocalFileHeader *_localFileHeader; bool _hasDataDescriptor; uint64_t _size; uint32_t _CRC32; bool _atEndOfStream, _closed; } - initWithStream: (OFStream*)path localFileHeader: (OFZIPArchive_LocalFileHeader*)localFileHeader; @end uint32_t |
︙ | ︙ | |||
521 522 523 524 525 526 527 | } - (size_t)lowlevelReadIntoBuffer: (void*)buffer length: (size_t)length { size_t min, ret; | | | 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | } - (size_t)lowlevelReadIntoBuffer: (void*)buffer length: (size_t)length { size_t min, ret; if (_atEndOfStream || _closed) @throw [OFReadFailedException exceptionWithObject: self requestedLength: length]; if (_hasDataDescriptor) { if ([_decompressedStream isAtEndOfStream]) { uint32_t CRC32; |
︙ | ︙ | |||
571 572 573 574 575 576 577 | _CRC32 = crc32(_CRC32, buffer, ret); return ret; } - (void)close { | | | 571 572 573 574 575 576 577 578 579 580 | _CRC32 = crc32(_CRC32, buffer, ret); return ret; } - (void)close { _closed = true; } @end |