Differences From Artifact [49afc93b6c]:
- File src/OFLHAArchiveEntry.m — part of check-in [d7e496ba27] at 2024-02-27 19:44:06 on branch trunk — OFLHAArchiveEntry: Skip level 2/3 header padding (user: js, size: 22475) [annotate] [blame] [check-ins using]
To Artifact [13f8a765b6]:
- File
src/OFLHAArchiveEntry.m
— part of check-in
[9a95da71d5]
at
2024-02-28 00:24:42
on branch trunk
— Add OFZooArchive
Only support for reading so far.
Compression methods 0 (uncompressed) and 2 (LZ77 + Huffman, apparently
identical to lh4/lh5) are supported. (user: js, size: 22475) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
29 30 31 32 33 34 35 | #import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" #import "OFUnsupportedVersionException.h" | < > | 29 30 31 32 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 | #import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" #import "OFUnsupportedVersionException.h" static OFDate * parseMSDOSDate(uint32_t MSDOSDate) { uint16_t year = ((MSDOSDate & 0xFE000000) >> 25) + 1980; uint8_t month = (MSDOSDate & 0x1E00000) >> 21; uint8_t day = (MSDOSDate & 0x1F); uint8_t hour = (MSDOSDate & 0xF800) >> 11; uint8_t minute = (MSDOSDate & 0x7E0) >> 5; uint8_t second = (MSDOSDate & 0x1F) << 1; OFString *dateString; dateString = [OFString stringWithFormat: @"%04u-%02u-%02u %02u:%02u:%02u", year, month, day, hour, minute, second]; return [OFDate dateWithLocalDateString: dateString format: @"%Y-%m-%d %H:%M:%S"]; } @implementation OFLHAArchiveEntry static void parseFileNameExtension(OFLHAArchiveEntry *entry, OFData *extension, OFStringEncoding encoding) { [entry->_fileName release]; entry->_fileName = nil; |
︙ | ︙ |