Differences From Artifact [39715cb197]:
- File
src/OFLHAArchive.m
— part of check-in
[6f13f74134]
at
2022-08-27 20:23:24
on branch trunk
— OFLHAArchiveEntry: Make (un)compressedSize ull
There's newer, less common LHA versions that allow 64 bit for the size.
However, for consistency with OFTarArchiveEntry, use unsigned long long
instead of uint64_t. (user: js, size: 12091) [annotate] [blame] [check-ins using]
To Artifact [16be8d0f67]:
- File src/OFLHAArchive.m — part of check-in [51589c6496] at 2022-08-27 20:39:50 on branch trunk — Rename OFFileOffset -> OFStreamOffset (user: js, size: 12101) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
58 59 60 61 62 63 64 | OF_DIRECT_MEMBERS @interface OFLHAArchiveFileWriteStream: OFStream <OFReadyForWritingObserving> { OFMutableLHAArchiveEntry *_entry; OFStringEncoding _encoding; OFSeekableStream *_stream; | | | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | OF_DIRECT_MEMBERS @interface OFLHAArchiveFileWriteStream: OFStream <OFReadyForWritingObserving> { OFMutableLHAArchiveEntry *_entry; OFStringEncoding _encoding; OFSeekableStream *_stream; OFStreamOffset _headerOffset; uint32_t _bytesWritten; uint16_t _CRC16; } - (instancetype)of_initWithStream: (OFSeekableStream *)stream entry: (OFLHAArchiveEntry *)entry encoding: (OFStringEncoding)encoding; |
︙ | ︙ | |||
394 395 396 397 398 399 400 | toRead = _entry.compressedSize - decompressingStream.bytesConsumed; stream = _stream; } if ([stream isKindOfClass: [OFSeekableStream class]] && | | | | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | toRead = _entry.compressedSize - decompressingStream.bytesConsumed; stream = _stream; } if ([stream isKindOfClass: [OFSeekableStream class]] && (sizeof(OFStreamOffset) > 4 || toRead != (OFStreamOffset)toRead)) [(OFSeekableStream *)stream seekToOffset: (OFStreamOffset)toRead whence: SEEK_CUR]; else { while (toRead > 0) { char buffer[512]; unsigned long long min = toRead; if (min > 512) |
︙ | ︙ | |||
512 513 514 515 516 517 518 | { return ((id <OFReadyForWritingObserving>)_stream) .fileDescriptorForWriting; } - (void)close { | | | 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | { return ((id <OFReadyForWritingObserving>)_stream) .fileDescriptorForWriting; } - (void)close { OFStreamOffset offset; if (_stream == nil) @throw [OFNotOpenException exceptionWithObject: self]; _entry.uncompressedSize = _bytesWritten; _entry.compressedSize = _bytesWritten; _entry.CRC16 = _CRC16; |
︙ | ︙ |