soma dey
soma dey

Reputation: 11

lzss.decode() in python is not giving correct output

I have a compressed file as per LZSS compression method. I am using lzss.decode() in Python for the compressed data. But I am not getting correct output. My code is given below:

import lzss    
input_1 = fp.read()

print("\n compressed: ", binascii.hexlify(input_1).decode("ascii"))

comp_out = lzss.decode(input_1)

print("\n uncompressed: ", binascii.hexlify(comp_out).decode("ascii"))

Output from code:

output from code

Correct uncompressed data correct uncompressed data

Could any one please help me on the problem?

Upvotes: 1

Views: 1711

Answers (1)

Bojan Jovanovic
Bojan Jovanovic

Reputation: 23

You can use encode_file()/decode_file() methods of lzss to compress/decompress the whole file. I did not have a problem with them.

Upvotes: 2

Related Questions