@@ -12,32 +12,35 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFStream.h" +#import "OFHuffmanTree.h" OF_ASSUME_NONNULL_BEGIN -#define OF_LHA_DECOMPRESSING_STREAM_BUFFER_SIZE 4096 +#define OFLHADecompressingStreamBufferSize 4096 OF_DIRECT_MEMBERS @interface OFLHADecompressingStream: OFStream { OFStream *_stream; uint8_t _distanceBits, _dictionaryBits; - unsigned char _buffer[OF_LHA_DECOMPRESSING_STREAM_BUFFER_SIZE]; + unsigned char _buffer[OFLHADecompressingStreamBufferSize]; uint32_t _bytesConsumed; uint16_t _bufferIndex, _bufferLength; uint8_t _byte; uint8_t _bitIndex, _savedBitsLength; uint16_t _savedBits; unsigned char *_slidingWindow; uint32_t _slidingWindowIndex, _slidingWindowMask; int _state; uint16_t _symbolsLeft; - struct of_huffman_tree *_Nullable _codeLenTree, *_Nullable _litLenTree; - struct of_huffman_tree *_Nullable _distTree, *_Nullable _treeIter; + OFHuffmanTree _Nullable _codeLenTree; + OFHuffmanTree _Nullable _litLenTree; + OFHuffmanTree _Nullable _distTree; + OFHuffmanTree _Nullable _treeIter; uint16_t _codesCount, _codesReceived; bool _currentIsExtendedLength, _skip; uint8_t *_Nullable _codesLengths; uint16_t _length; uint32_t _distance;