Differences From Artifact [6f9fadd6e2]:
- File src/OFLHAArchive.m — part of check-in [fca5e53e12] at 2018-06-04 22:05:20 on branch trunk — OFLHAArchive: Verify CRC16 checksum (user: js, size: 18316) [annotate] [blame] [check-ins using]
To Artifact [19e9187eb0]:
- File
src/OFLHAArchive.m
— part of check-in
[744956a000]
at
2018-06-04 22:47:15
on branch trunk
— OFLHAArchive: Prefill the sliding window with ' '
Apparently, there are two incompatible variants of LHA: One where the
sliding window is prefilled with zeros and one where it is prefilled
with spaces. It seems prefilling it with spaces is the original way,
while LHA on Amiga prefilled it with zeros.As it is impossible to detect which one was used, a flag will be added
later to provide an Amiga compatibility mode. (user: js, size: 18365) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
295 296 297 298 299 300 301 | /* 0-7 address the bit, 8 means fetch next byte */ _bitIndex = 8; _distanceBits = distanceBits; _dictionaryBits = dictionaryBits; _slidingWindowMask = (1 << dictionaryBits) - 1; | | > | 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | /* 0-7 address the bit, 8 means fetch next byte */ _bitIndex = 8; _distanceBits = distanceBits; _dictionaryBits = dictionaryBits; _slidingWindowMask = (1 << dictionaryBits) - 1; _slidingWindow = [self allocMemoryWithSize: _slidingWindowMask + 1]; memset(_slidingWindow, ' ', _slidingWindowMask + 1); } @catch (id e) { [self release]; @throw e; } return self; } |
︙ | ︙ |