byronknoll / cmix

cmix is a lossless data compression program aimed at optimizing compression ratio at the cost of high CPU/memory usage.
http://www.byronknoll.com/cmix.html
GNU General Public License v3.0
613 stars 45 forks source link

decoding mismatch #47

Closed futing1993 closed 4 years ago

futing1993 commented 4 years ago

I use cmix v18 to compress a batch of file,and I found some of the decoded file do not match the original ones. It is a random issue, because I can't reproduce this bug with the same file. I encoded one file for 100 times, and several times the md5 of the encoded file are different. Do you have any idea solving this issue?

byronknoll commented 4 years ago

hmm, this might be tricky to debug. A couple things to try:

1) run a diagnostic on your computer's RAM. I had an issue similar to what you are describing before, and it turned out due to some RAM failure that caused bit flipping.

2) try compiling with -O3 instead of -Ofast, or switch to a different compiler. cmix uses some float operations that I have seen some nondeterminism before (with different compilers/option combinations).

futing1993 commented 4 years ago

Thanks a lot for such a prompt reply!