From 56bfed7e2cdd44dc4ad0c5e233224cf0080e05ac Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 2 Dec 2018 00:38:12 +0100 Subject: replace linkedlists by seqs --- src/lzsshuffman/lzsshuffmandecoder.nim | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/lzsshuffman/lzsshuffmandecoder.nim') diff --git a/src/lzsshuffman/lzsshuffmandecoder.nim b/src/lzsshuffman/lzsshuffmandecoder.nim index cd71914..a307774 100644 --- a/src/lzsshuffman/lzsshuffmandecoder.nim +++ b/src/lzsshuffman/lzsshuffmandecoder.nim @@ -14,9 +14,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import lists import ../bitio/bitreader -import ../lzss/listpolyfill, ../lzss/lzssnode, ../lzss/lzsschain +import ../lzss/lzssnode, ../lzss/lzsschain import ../huffman/huffmantree, ../huffman/huffmandecoder import lzsshuffmansymbol @@ -26,9 +25,9 @@ proc readChain*(bitReader: BitReader, symbolDecoder, positionDecoder: HuffmanDec while not symbol.isEndMarker(): if byteCursor > maxDataByteLength: raise newException(IOError, "lzss block too long") if symbol.isCharacter(): - chain.append(lzssCharacter(symbol.uint8)) + chain.add(lzssCharacter(symbol.uint8)) else: let position = positionDecoder.decode(bitReader) - chain.append(unpackLzssReference(symbol, position)) + chain.add(unpackLzssReference(symbol, position)) (symbol, byteCursor) = (symbolDecoder.decode(bitReader).Symbol, byteCursor + 1) chain -- cgit v1.2.3