Differences From Artifact [677d90ca2c]:
- File
src/OFInflateStream.h
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 2957) [annotate] [blame] [check-ins using] [more...]
To Artifact [c61dd6afda]:
- File
src/OFInflateStream.h
— part of check-in
[d3158d091f]
at
2016-01-05 22:00:03
on branch trunk
— (u)int_fast*_t -> (u)int*_t
(U)INT_FAST*_MAX is broken on Android, which makes (u)int_fast*_t
dangerous to use while it does not provide any real speed benefit. (user: js, size: 2902) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
29 30 31 32 33 34 35 | @interface OFInflateStream: OFStream { #ifdef OF_INFLATE_STREAM_M @public #endif OFStream *_stream; uint8_t _buffer[OF_INFLATE_STREAM_BUFFER_SIZE]; | | | | | | | | | | | | | 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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | @interface OFInflateStream: OFStream { #ifdef OF_INFLATE_STREAM_M @public #endif OFStream *_stream; uint8_t _buffer[OF_INFLATE_STREAM_BUFFER_SIZE]; uint16_t _bufferIndex, _bufferLength; uint8_t _byte; uint8_t _bitIndex, _savedBitsLength; uint16_t _savedBits; @protected uint8_t *_slidingWindow; uint16_t _slidingWindowIndex, _slidingWindowMask; enum { OF_INFLATE_STREAM_BLOCK_HEADER, OF_INFLATE_STREAM_UNCOMPRESSED_BLOCK_HEADER, OF_INFLATE_STREAM_UNCOMPRESSED_BLOCK, OF_INFLATE_STREAM_HUFFMAN_TREE, OF_INFLATE_STREAM_HUFFMAN_BLOCK } _state; union { struct { uint8_t position; uint8_t length[4]; } uncompressedHeader; struct { uint16_t position, length; } uncompressed; struct { struct huffman_tree *litLenTree, *distTree; struct huffman_tree *codeLenTree, *treeIter; uint8_t *lengths; uint16_t receivedCount; uint8_t value, litLenCodesCount, distCodesCount; uint8_t codeLenCodesCount; } huffmanTree; struct { struct huffman_tree *litLenTree, *distTree, *treeIter; enum { OF_INFLATE_STREAM_WRITE_VALUE, OF_INFLATE_STREAM_AWAIT_CODE, OF_INFLATE_STREAM_AWAIT_LENGTH_EXTRA_BITS, OF_INFLATE_STREAM_AWAIT_DISTANCE, OF_INFLATE_STREAM_AWAIT_DISTANCE_EXTRA_BITS, OF_INFLATE_STREAM_PROCESS_PAIR } state; uint16_t value, length, distance; uint16_t extraBits; } huffman; } _context; bool _inLastBlock, _atEndOfStream; } /*! * @brief Creates a new OFInflateStream with the specified underlying stream. |
︙ | ︙ |