Crow supports Zlib compression using Gzip or Deflate algorithms.
HTTP compression is by default disabled in crow. Do the following to enable it:
#define CROW_ENABLE_COMPRESSION to the top of your main source file.
use_compression(crow::compression::algorithm) on your crow app.
3. When compiling your application, make sure that ZLIB is included as a dependency. Either through
-lz argument or
find_package(ZLIB) in CMake.
step 3 is not needed for MSVC since
vcpckg.json already includes zlib as a dependency by default
For the compression algorim you can use
And now your HTTP responses will be compressed.
Crow currently does not support Websocket compression.
Feel free to discuss the subject with us on Github if you're feeling adventurous and want to try to implement it. We appreciate all the help.