ebiggers / libdeflate

Heavily optimized library for DEFLATE/zlib/gzip compression and decompression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v1.14 - v1.18 deflate compatibility

OlliV opened this issue · comments

I wonder if it's intentional that v1.18 libdeflate_deflate_decompress() can't decompress deflate buffer produced by libdeflate_deflate_compress() of v1.14 and vice versa. I couldn't quickly find any related issue or commit that would explain this. Everything works fine if I'm compressing and decompressing with the same version, which suits for me. However, I'm just wondering if there is/was a bug that causes incompatibility with other tools.

Every version of libdeflate can decompress data produced by every other version.

I just tested v1.14 => v1.18 and don't see this issue.

Please provide more details.

Ok, interesting and good. What I did was just basically replaced the .so and header and then recompiled my software.
I'll try to make some sort of repro soonish.

edit:
Actually, I'm specifically relying on libdeflate_deflate_decompress_ex() to be able to return the exact amount of bytes consumed from the given input buffer.

I'm specifically relying on libdeflate_deflate_decompress_ex() to be able to return the exact amount of bytes consumed from the given input buffer.

Just tested this too, and it works fine.

Thanks. It must be me doing something wrong.

Okay. If upon further investigation you're able to narrow it down to a problem in libdeflate, I'd be glad to take a look, but I'd need more information.