Overview
Comment: | ofzip: Show compression method for ZIP archives |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
fd5dac720dd39a57e5589ba31a7a4edd |
User & Date: | js on 2018-06-10 14:42:24 |
Other Links: | manifest | tags |
Context
2018-06-10
| ||
15:29 | Add OFMutableLHAArchiveEntry check-in: 60ecab6058 user: js tags: trunk | |
14:42 | ofzip: Show compression method for ZIP archives check-in: fd5dac720d user: js tags: trunk | |
12:29 | OFLHAArchive: Skip compressed entries much faster check-in: 2e354552ad user: js tags: trunk | |
Changes
Modified src/OFLHAArchive.m from [4ab39c71a2] to [f7e8cf8472].
︙ | |||
724 725 726 727 728 729 730 | 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 | - + - + - + + - + - + | @implementation OFLHAArchive_FileReadStream - (instancetype)of_initWithStream: (OF_KINDOF(OFStream *))stream entry: (OFLHAArchiveEntry *)entry { self = [super init]; @try { |
︙ |
Modified src/OFLHAArchiveEntry.h from [88951356da] to [d2c4f03490].
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + - + | * archive. */ @interface OFLHAArchiveEntry: OFObject <OFCopying> { #ifdef OF_LHA_ARCHIVE_ENTRY_M @public #endif |
︙ |
Modified src/OFLHAArchiveEntry.m from [8228378a63] to [af0de69839].
︙ | |||
260 261 262 263 264 265 266 | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | + - + | entry->_compressedSize -= size; } } } @implementation OFLHAArchiveEntry @synthesize compressionMethod = _compressionMethod; |
︙ | |||
282 283 284 285 286 287 288 | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | - + | encoding: (of_string_encoding_t)encoding { self = [super init]; @try { uint32_t date; |
︙ | |||
354 355 356 357 358 359 360 | 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | - + | } return self; } - (void)dealloc { |
︙ | |||
394 395 396 397 398 399 400 | 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 421 422 423 424 425 426 427 428 429 | - + - + | : [OFString stringWithFormat: @"%" PRIo16, [_mode uInt16Value]]); OFString *extensions = [[_extensions description] stringByReplacingOccurrencesOfString: @"\n" withString: @"\n\t"]; OFString *ret = [OFString stringWithFormat: @"<%@:\n" @"\tFile name = %@\n" |
Modified src/OFZIPArchiveEntry.h from [b4cca6f0e2] to [bd6fa00871].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - - - + + + + + + + + + + + + + | #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN /*! @file */ enum { |
︙ | |||
211 212 213 214 215 216 217 | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | - + + + + + + + + + + + | - (instancetype)initWithFileName: (OFString *)fileName; @end #ifdef __cplusplus extern "C" { #endif /*! |
︙ |
Modified src/OFZIPArchiveEntry.m from [4035dadee9] to [75020cd35d].
︙ | |||
104 105 106 107 108 109 110 111 112 113 114 115 116 117 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | @"%u.%u, %s", (version & 0xFF) / 10, (version & 0xFF) % 10, attrCompat]; else return [OFString stringWithFormat: @"%u.%u, unknown %02X", (version % 0xFF) / 10, (version & 0xFF) % 10, version >> 8]; } OFString * of_zip_archive_entry_compression_method_to_string(uint16_t compressionMethod) { switch (compressionMethod) { case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_NONE: return @"none"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_SHRINK: return @"Shrink"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_REDUCE_FACTOR_1: return @"Reduce (factor 1)"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_REDUCE_FACTOR_2: return @"Reduce (factor 2)"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_REDUCE_FACTOR_3: return @"Reduce (factor 3)"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_REDUCE_FACTOR_4: return @"Reduce (factor 4)"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_IMPLODE: return @"Implode"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_DEFLATE: return @"Deflate"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_DEFLATE64: return @"Deflate64"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_BZIP2: return @"BZip2"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_LZMA: return @"LZMA"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_WAVPACK: return @"WavPack"; case OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_PPMD: return @"PPMd"; default: return @"unknown"; } } size_t of_zip_archive_entry_extra_field_find(OFData *extraField, uint16_t tag, uint16_t *size) { const uint8_t *bytes = [extraField items]; size_t count = [extraField count]; |
︙ | |||
397 398 399 400 401 402 403 404 405 406 407 408 | 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | + + + - + - + | { return _localFileHeaderOffset; } - (OFString *)description { void *pool = objc_autoreleasePoolPush(); OFString *compressionMethod = of_zip_archive_entry_compression_method_to_string( _compressionMethod); OFString *ret = [OFString stringWithFormat: @"<%@:\n" @"\tFile name = %@\n" @"\tFile comment = %@\n" @"\tGeneral purpose bit flag = %u\n" |
︙ |
Modified utils/ofzip/LHAArchive.m from [88f33686f9] to [5c903f71dd].
︙ | |||
171 172 173 174 175 176 177 | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | - - - + + + | [of_stdout writeLine: OF_LOCALIZED( @"list_level", @"Level: %[level]", @"level", level)]; [of_stdout writeString: @"\t"]; [of_stdout writeLine: OF_LOCALIZED( |
︙ |
Modified utils/ofzip/ZIPArchive.m from [7a34fc0000] to [ca1152d27c].
︙ | |||
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | + + + + + + + + | if (app->_outputLevel >= 1) { OFString *compressedSize = [OFString stringWithFormat: @"%" PRIu64, [entry compressedSize]]; OFString *uncompressedSize = [OFString stringWithFormat: @"%" PRIu64, [entry uncompressedSize]]; OFString *compressionMethod = of_zip_archive_entry_compression_method_to_string( [entry compressionMethod]); OFString *CRC32 = [OFString stringWithFormat: @"%08" PRIX32, [entry CRC32]]; OFString *modificationDate = [[entry modificationDate] localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"]; [of_stdout writeString: @"\t"]; [of_stdout writeLine: OF_LOCALIZED( @"list_compressed_size", @"Compressed: %[size] bytes", @"size", compressedSize)]; [of_stdout writeString: @"\t"]; [of_stdout writeLine: OF_LOCALIZED( @"list_uncompressed_size", @"Uncompressed: %[size] bytes", @"size", uncompressedSize)]; [of_stdout writeString: @"\t"]; [of_stdout writeLine: OF_LOCALIZED( @"list_compression_method", @"Compression method: %[method]", @"method", compressionMethod)]; [of_stdout writeString: @"\t"]; [of_stdout writeLine: OF_LOCALIZED(@"list_crc32", @"CRC32: %[crc32]", @"crc32", CRC32)]; [of_stdout writeString: @"\t"]; [of_stdout writeLine: OF_LOCALIZED( @"list_modification_date", |
︙ |
Modified utils/ofzip/lang/de.json from [6ac8dc5514] to [2b84d78f2c].
︙ | |||
83 84 85 86 87 88 89 90 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | + - | "list_device_minor": "Minor-Nummer des Geräts: %[minor]", "list_type_directory": "Typ: Verzeichnis", "list_type_fifo": "Typ: FIFO", "list_type_contiguous_file": "Typ: Zusammenhängende Datei", "list_type_unknown": "Typ: Unbekannt", "list_compressed_size": "Komprimierte Größe: %[size] Bytes", "list_uncompressed_size": "Unkomprimierte Größe: %[size] Bytes", "list_compression_method": "Kompressionsmethode: %[method]", "list_date": "Datum: %[date]", |
︙ |