Hi Igor,
  Glad to hear the agreement. Thanks for your reminder about the decompression case. And the backward compatibility should be considered as well.

  We'll look deep into it following your suggestion next.

Xiyuan Wang

Igor Fedotov <ifedotov@suse.de> 于2019年12月18日周三 下午9:57写道:


I think it's fine to have this parameter configurable. One question here though - does one have to provide the same windowsBits value to inflateInit2 func call on decompression as it was during compression? If that's true - you should persist the value along with the compressed block and reuse it during decompression. Which is probably fine too but needs a bit more work.



On 12/18/2019 11:45 AM, Xiyuan Wang wrote:
    Recently we meet a requirement about Zlib windowBits for compression.

In the source code, we found that the zlib windowBits is hard code as -15[1]. While in zlib, it's a parameter that can be setting to different value.[2] According to zlib guide, windowBits can be set to [-15, -8) for raw deflate, (8, 15] for compression with header and trailer and [16,) for optional gzip encoding. Now we want to set it to 15 in Ceph to satisfy our requirement. Is it possible for Ceph Upstream to make it configurable, so that users can change it with their different use case? Or any other way to support it?

Hope to get community's feedback. And I have registered a feature[3] as well. Feel free to leave any comment.

Xiyuan Wang

[1]: https://github.com/ceph/ceph/blob/master/src/compressor/zlib/ZlibCompressor.cc#L43
[2]: https://github.com/madler/zlib/blob/cacf7f1d4e3d44d871b605da3b647f07d718623f/zlib.h#L552-L576
[3]: https://tracker.ceph.com/issues/43324

Dev mailing list -- dev@ceph.io
To unsubscribe send an email to dev-leave@ceph.io