ebiggers / xpack

Experimental compression format (unmaintained, do not use!)
MIT License
30 stars 2 forks source link

Decompression error #1

Open inikep opened 8 years ago

inikep commented 8 years ago

I've added xpack to lzbench v1.2: https://github.com/inikep/lzbench/commits/v1.2

When I'm doing tests with the following file: https://docs.google.com/uc?id=0BwX7dtyRLxThRzBwT0xkUy1TMFE&export=download I have decompression error:

Compressor name         Compress. Decompress. Compr. size  Ratio Filename
memcpy                   5146 MB/s  6315 MB/s   104857600 100.00 ../tests/win81
xpack 2016-06-02 -1        99 MB/s   554 MB/s    46855434  44.68 ../tests/win81
xpack 2016-06-02 -2        35 MB/s   580 MB/s    44322204  42.27 ../tests/win81
xpack 2016-06-02 -3        15 MB/s      ERROR    42681190  40.70 ../tests/win81
xpack 2016-06-02 -4        32 MB/s   615 MB/s    42856371  40.87 ../tests/win81
xpack 2016-06-02 -5        14 MB/s   641 MB/s    41357541  39.44 ../tests/win81
xpack 2016-06-02 -6      4.40 MB/s      ERROR    40969183  39.07 ../tests/win81
xpack 2016-06-02 -7      1.43 MB/s      ERROR    40754244  38.87 ../tests/win81
xpack 2016-06-02 -8      0.61 MB/s      ERROR    40660609  38.78 ../tests/win81
xpack 2016-06-02 -9      0.30 MB/s      ERROR    40589910  38.71 ../tests/win81

I think that the problem can be that I'm trying to compress/decompress whole file with a single call to xpack_compress()/xpack_decompress().

xpack return code is DECOMPRESS_BAD_DATA

ebiggers commented 8 years ago

Large buffer sizes aren't supported very well yet; I wouldn't really suggest anything over 2^19 (524288) bytes. This is definitely a big problem and I am planning to address it.

inikep commented 8 years ago

Thanks for answer. I think that for now you should return an error when compressed data is bigger than 2^19. Corrupted data is a huge problem in comparison to a compression error.