246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
[_inflateStream release];
_inflateStream = nil;
_state++;
break;
case OFGZIPStreamStateCRC32:
_bytesRead += [_stream readIntoBuffer: _buffer
length: 4 - _bytesRead];
if (_bytesRead < 4)
return 0;
CRC32 = ((uint32_t)_buffer[3] << 24) |
(_buffer[2] << 16) | (_buffer[1] << 8) | _buffer[0];
if (~_CRC32 != CRC32) {
|
|
>
|
|
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
|
[_inflateStream release];
_inflateStream = nil;
_state++;
break;
case OFGZIPStreamStateCRC32:
_bytesRead += [_stream
readIntoBuffer: _buffer + _bytesRead
length: 4 - _bytesRead];
if (_bytesRead < 4)
return 0;
CRC32 = ((uint32_t)_buffer[3] << 24) |
(_buffer[2] << 16) | (_buffer[1] << 8) | _buffer[0];
if (~_CRC32 != CRC32) {
|
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
|
}
_bytesRead = 0;
_CRC32 = ~0;
_state++;
break;
case OFGZIPStreamStateUncompressedSize:
_bytesRead += [_stream readIntoBuffer: _buffer
length: 4 - _bytesRead];
uncompressedSize = ((uint32_t)_buffer[3] << 24) |
(_buffer[2] << 16) | (_buffer[1] << 8) | _buffer[0];
if (_uncompressedSize != uncompressedSize) {
OFString *actual = [OFString stringWithFormat:
@"%" PRIu32, _uncompressedSize];
OFString *expected = [OFString stringWithFormat:
@"%" PRIu32, uncompressedSize];
|
|
>
|
>
>
>
|
|
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
|
}
_bytesRead = 0;
_CRC32 = ~0;
_state++;
break;
case OFGZIPStreamStateUncompressedSize:
_bytesRead += [_stream
readIntoBuffer: _buffer + _bytesRead
length: 4 - _bytesRead];
if (_bytesRead < 4)
return 0;
uncompressedSize = (_buffer[3] << 24) |
(_buffer[2] << 16) | (_buffer[1] << 8) | _buffer[0];
if (_uncompressedSize != uncompressedSize) {
OFString *actual = [OFString stringWithFormat:
@"%" PRIu32, _uncompressedSize];
OFString *expected = [OFString stringWithFormat:
@"%" PRIu32, uncompressedSize];
|