Differences From Artifact [548b68c743]:
- File src/OFLHADecompressingStream.m — part of check-in [da1fb6b21c] at 2020-11-05 02:27:35 on branch trunk — Further reduce usage of -[allocMemoryWithSize:] (user: js, size: 12532) [annotate] [blame] [check-ins using] [more...]
To Artifact [9b1fbea443]:
- File
src/OFLHADecompressingStream.m
— part of check-in
[627511b032]
at
2020-11-14 12:23:55
on branch trunk
— Rename of_malloc and of_calloc
The new names should be more accurate. (user: js, size: 12549) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
106 107 108 109 110 111 112 | /* 0-7 address the bit, 8 means fetch next byte */ _bitIndex = 8; _distanceBits = distanceBits; _dictionaryBits = dictionaryBits; _slidingWindowMask = (1u << dictionaryBits) - 1; | | | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | /* 0-7 address the bit, 8 means fetch next byte */ _bitIndex = 8; _distanceBits = distanceBits; _dictionaryBits = dictionaryBits; _slidingWindowMask = (1u << dictionaryBits) - 1; _slidingWindow = of_alloc(_slidingWindowMask + 1, 1); memset(_slidingWindow, ' ', _slidingWindowMask + 1); } @catch (id e) { [self release]; @throw e; } return self; |
︙ | ︙ | |||
173 174 175 176 177 178 179 | if OF_UNLIKELY (bits == 0) { _state = STATE_CODE_LEN_TREE_SINGLE; goto start; } _codesCount = bits; _codesReceived = 0; | | | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | if OF_UNLIKELY (bits == 0) { _state = STATE_CODE_LEN_TREE_SINGLE; goto start; } _codesCount = bits; _codesReceived = 0; _codesLengths = of_alloc_zeroed(bits, 1); _skip = true; _state = STATE_CODE_LEN_TREE; goto start; case STATE_CODE_LEN_TREE: while (_codesReceived < _codesCount) { if OF_UNLIKELY (_currentIsExtendedLength) { |
︙ | ︙ | |||
254 255 256 257 258 259 260 | _state = STATE_LITLEN_TREE_SINGLE; goto start; } _codesCount = bits; _codesReceived = 0; | | | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | _state = STATE_LITLEN_TREE_SINGLE; goto start; } _codesCount = bits; _codesReceived = 0; _codesLengths = of_alloc_zeroed(bits, 1); _skip = false; _treeIter = _codeLenTree; _state = STATE_LITLEN_TREE; goto start; case STATE_LITLEN_TREE: while (_codesReceived < _codesCount) { |
︙ | ︙ | |||
344 345 346 347 348 349 350 | if OF_UNLIKELY (bits == 0) { _state = STATE_DIST_TREE_SINGLE; goto start; } _codesCount = bits; _codesReceived = 0; | | | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 | if OF_UNLIKELY (bits == 0) { _state = STATE_DIST_TREE_SINGLE; goto start; } _codesCount = bits; _codesReceived = 0; _codesLengths = of_alloc_zeroed(bits, 1); _treeIter = _codeLenTree; _state = STATE_DIST_TREE; goto start; case STATE_DIST_TREE: while (_codesReceived < _codesCount) { if OF_UNLIKELY (_currentIsExtendedLength) { |
︙ | ︙ |