Overview
| Comment: | OFLHAArchive: Add support for -lz4- files |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
42ab7308b9337244e032fa078ec024c8 |
| User & Date: | js on 2024-02-24 16:17:51 |
| Other Links: | manifest | tags |
Context
|
2024-02-24
| ||
| 17:24 | OFLHAArchive: Ignore trailing garbage (check-in: 35257251ec user: js tags: trunk) | |
| 16:17 | OFLHAArchive: Add support for -lz4- files (check-in: 42ab7308b9 user: js tags: trunk) | |
| 15:05 | OFLHAArchiveEntry: Add extra sanity checks (check-in: 4c56240653 user: js tags: trunk) | |
Changes
Modified src/OFLHAArchive.m from [80292dff55] to [f92b1ecdad].
| ︙ | ︙ | |||
322 323 324 325 326 327 328 | dictionaryBits: 17]; else if ([compressionMethod isEqual: @"-lhx-"]) _decompressedStream = [[OFLHADecompressingStream alloc] of_initWithStream: stream distanceBits: 5 dictionaryBits: 20]; else if ([compressionMethod isEqual: @"-lh0-"] || | | > | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | dictionaryBits: 17]; else if ([compressionMethod isEqual: @"-lhx-"]) _decompressedStream = [[OFLHADecompressingStream alloc] of_initWithStream: stream distanceBits: 5 dictionaryBits: 20]; else if ([compressionMethod isEqual: @"-lh0-"] || [compressionMethod isEqual: @"-lhd-"] || [compressionMethod isEqual: @"-lz4-"]) _decompressedStream = [stream retain]; else @throw [OFUnsupportedVersionException exceptionWithVersion: compressionMethod]; _entry = [entry copy]; _toRead = entry.uncompressedSize; |
| ︙ | ︙ |
Modified utils/ofarc/OFArc.m from [71ea16470c] to [6f8333dc2e].
| ︙ | ︙ | |||
558 559 560 561 562 563 564 |
if (type == nil || [type isEqual: @"auto"]) {
/* This one has to be first for obvious reasons */
if ([path hasSuffix: @".tar.gz"] || [path hasSuffix: @".tgz"] ||
[path hasSuffix: @".TAR.GZ"] || [path hasSuffix: @".TGZ"])
type = @"tgz";
else if ([path hasSuffix: @".gz"] || [path hasSuffix: @".GZ"])
type = @"gz";
| | > | 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
if (type == nil || [type isEqual: @"auto"]) {
/* This one has to be first for obvious reasons */
if ([path hasSuffix: @".tar.gz"] || [path hasSuffix: @".tgz"] ||
[path hasSuffix: @".TAR.GZ"] || [path hasSuffix: @".TGZ"])
type = @"tgz";
else if ([path hasSuffix: @".gz"] || [path hasSuffix: @".GZ"])
type = @"gz";
else if ([path hasSuffix: @".lha"] ||
[path hasSuffix: @".lzh"] || [path hasSuffix: @".lzs"])
type = @"lha";
else if ([path hasSuffix: @".tar"] || [path hasSuffix: @".TAR"])
type = @"tar";
else
type = @"zip";
}
|
| ︙ | ︙ |