ebiggers / libdeflate

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slow level 0 "compression"

dktapps opened this issue · comments

Level 0 libdeflate_deflate_compress is strangely slow, much slower than zlib.

It spends most of its time in deflate_compress_lazy_generic, doing what I have no idea, since it should just be adding a header and a footer as far as I can tell.

Tested with payloads of 250x NUL bytes.

This suggests that you are not actually using level 0. Please ensure that you are really passing 0 to libdeflate_alloc_compressor().

Sorry, you are correct, I had a bug in my code :)