pistacheio / pistache

A high-performance REST toolkit written in C++
https://pistacheio.github.io/pistache/
Apache License 2.0
3.12k stars 685 forks source link

[FEATURE REQUEST] Add support for zstd compression #1200

Open kiplingw opened 2 months ago

kiplingw commented 2 months ago

We currently have br (Brotli) and deflate compression codecs among our list of Content-Encoder support. Zstd is the new kid on the block. It is a fast lossless compression codec created by Facebook. We don't currently have support for it.

To implement support should be fairly straightforward in recycling the now already familiar pattern for the two other codecs in Pistache. The reference C implementation is available on Debian based systems as libzstd-dev.

A PR needs to update the build environment, ensuring building with support for it is optional; the d/control and d/rules would also need to modified with the new build dependency, our README to mention it, the minor version bumped, and a unit test added.