tomtor/HDL-deflate

The output number for o_oprogress is not match with o_byte amount in compression mode

ITINGKUO opened this issue · 1 comments

Hi,

I follow the test bench to run, all steps are correct. the o_oprogress is 498 after decompression and the o_oprogress is 195 after compression. Why here is 195? not 88 bytes? Is it different with zlib compression in python?

However, I try to use other str_data (len: 222 ) like below:
fkldsafkmklsmfkslmfklsmdflksjfireagfnmfjvjknaflajflkdmfmdk;vmdisakjdfmvfk;lfdvmk;mdifmvdkjf.vmkfdl;mvkfdl;vmkfmkvmkadflvmkdsa;mvior;ijfijrgnkjdfnvjnfal;vmk;adsmfvndfjsklvmkd;mvk;mfsanvmdkjfslmvkldfa;vmkfd;mvdfskjvlmdkvlfmv

After compression process, I got 191 for o_oprogress but the real length for the o_byte is 260. If I use 260 o_byte data to do decompression, that is ok. But if I use 191, then some word will be lost. Why their length is different?

By the way, in the python test bench the sresult is 206.
IN/OUT/CYCLES/WAIT 222 206 810 263
rlen 222
zlib test: b'fkldsafkmklsmfkslmfklsmdflksjfireagfnmfjvjknaflajflkdmfmdk;vmdisakjdfmvfk;lfdvmk;mdifmvdkjf.vmkfdl;mvkfdl;vmkfmkvmkadflvmkdsa;mvior;ijfijrgnkjdfnvjnfal;vmk;adsmfvndfjsklvmkd;mvk;mfsanvmdkjfslmvkldfa;vmkfd;mvdfskjvlmdkvlfmv'
DONE!
ok

Would you please help me to check is my problem or the compression function have an issue?

I found that I write the wrong type to catch o_byte. Sorry to bother you....