Overview
Comment: | OFLHAArchiveEntry: Make (un)compressedSize ull
There's newer, less common LHA versions that allow 64 bit for the size. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6f13f741344ec40aaef45867a64fd67f |
User & Date: | js on 2022-08-27 20:23:24 |
Other Links: | manifest | tags |
Context
2022-08-27
| ||
20:33 | OFZIPArchiveEntry: Make (un)compressedSize ull check-in: 94c326ab78 user: js tags: trunk | |
20:23 | OFLHAArchiveEntry: Make (un)compressedSize ull check-in: 6f13f74134 user: js tags: trunk | |
2022-08-25
| ||
19:56 | OFLHAArchiveEntry: Merge date and modificationDate check-in: 327e67021e user: js tags: trunk | |
Changes
Modified src/OFLHAArchive.m from [3c453bb2f0] to [39715cb197].
︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + | }; OF_DIRECT_MEMBERS @interface OFLHAArchiveFileReadStream: OFStream <OFReadyForReadingObserving> { OFStream *_stream, *_decompressedStream; OFLHAArchiveEntry *_entry; |
︙ | |||
329 330 331 332 333 334 335 | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | - + | if (_atEndOfStream) return 0; if (_stream.atEndOfStream && !_decompressedStream.hasDataInReadBuffer) @throw [OFTruncatedDataException exception]; if (length > _toRead) |
︙ | |||
369 370 371 372 373 374 375 | 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | - + | return ((id <OFReadyForReadingObserving>)_decompressedStream) .fileDescriptorForReading; } - (void)of_skip { OFStream *stream; |
︙ | |||
394 395 396 397 398 399 400 | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | - + - + - + + | toRead = _entry.compressedSize - decompressingStream.bytesConsumed; stream = _stream; } if ([stream isKindOfClass: [OFSeekableStream class]] && |
︙ |
Modified src/OFLHAArchiveEntry.h from [667eea830b] to [1b1edad7fa].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + | * @class OFLHAArchiveEntry OFLHAArchiveEntry.h ObjFW/OFLHAArchiveEntry.h * * @brief A class which represents an entry in an LHA archive. */ @interface OFLHAArchiveEntry: OFObject <OFCopying, OFMutableCopying> { OFString *_fileName, *_Nullable _directoryName, *_compressionMethod; |
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + - + | * @brief The compression method of the entry. */ @property (readonly, copy, nonatomic) OFString *compressionMethod; /** * @brief The compressed size of the entry's file. */ |
︙ |
Modified src/OFLHAArchiveEntry.m from [027838e133] to [c71c080e0a].
︙ | |||
333 334 335 336 337 338 339 340 | 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | + + + + - + + - + + | uint32_t date; _compressionMethod = [[OFString alloc] initWithCString: header + 2 encoding: OFStringEncodingASCII length: 5]; if (_compressedSize > UINT32_MAX || _uncompressedSize > UINT32_MAX) @throw [OFOutOfRangeException exception]; memcpy(&_compressedSize, header + 7, 4); |
︙ | |||
471 472 473 474 475 476 477 | 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | - + - + | } - (OFString *)compressionMethod { return _compressionMethod; } |
︙ | |||
555 556 557 558 559 560 561 | 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 | - + + - + - + | OFStringEncodingASCII] != 5) @throw [OFInvalidArgumentException exception]; getFileNameAndDirectoryName(self, encoding, &fileName, &fileNameLength, &directoryName, &directoryNameLength); if (fileNameLength > UINT16_MAX - 3 || |
︙ | |||
719 720 721 722 723 724 725 | 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 | - - + + | OFString *extensions = [_extensions.description stringByReplacingOccurrencesOfString: @"\n" withString: @"\n\t"]; OFString *ret = [OFString stringWithFormat: @"<%@:\n" @"\tFile name = %@\n" @"\tCompression method = %@\n" |
︙ |
Modified src/OFMutableLHAArchiveEntry.h from [eae4b7cde4] to [14f294b208].
︙ | |||
37 38 39 40 41 42 43 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + - + | * @brief The compression method of the entry. */ @property (readwrite, copy, nonatomic) OFString *compressionMethod; /** * @brief The compressed size of the entry's file. */ |
︙ |
Modified src/OFMutableLHAArchiveEntry.m from [c791dddd21] to [423181bd19].
︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - + - + | - (void)setCompressionMethod: (OFString *)compressionMethod { OFString *old = _compressionMethod; _compressionMethod = [compressionMethod copy]; [old release]; } |
︙ |
Modified utils/ofarc/LHAArchive.m from [5f83697ea8] to [a1e8c6e072].
︙ | |||
119 120 121 122 123 124 125 | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + - + | [OFStdOut writeLine: entry.fileName]; if (app->_outputLevel >= 1) { OFString *modificationDate = [entry.modificationDate localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"]; OFString *compressedSize = [OFString stringWithFormat: |
︙ | |||
254 255 256 257 258 259 260 | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | - + | while ((entry = [_archive nextEntry]) != nil) { void *pool = objc_autoreleasePoolPush(); OFString *fileName = entry.fileName; OFString *outFileName, *directory; OFFile *output; OFStream *stream; |
︙ |