http_proto icon indicating copy to clipboard operation
http_proto copied to clipboard

serializer should provide an interface for conditionally setting Content-Encoding header

Open ashtum opened this issue 5 months ago • 0 comments

For efficiency reasons, servers tend not to compress small response bodies. To address this, we define a threshold and skip compressing bodies smaller than that. However, for some source objects it is not possible to determine the body length beforehand (such as when serializing a Boost.JSON value). Since only the serializer knows the length of the produced data before compression, it should either handle this operation itself or provide the necessary information and interface for users to do so.

ashtum avatar Aug 27 '25 19:08 ashtum