libyrmcds
memcached/yrmcds client library for C
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
yrmcds_error yrmcds_set_compression ( yrmcds c,
size_t  threshold 
)

Enable/disable (de)compression for large objects.

Parameters
cA pointer to yrmcds.
thresholdThe threshold for compression.
Returns
0 if arguments are valid. Other values indicate an error.

This function enables transparent compression using LZ4 if threshold is greater than 0. If threshold is 0, then compression is disabled.

The compression is disabled by default.

If the library is built without LZ4, this function always return YRMCDS_NOT_IMPLEMENTED.

Note that YRMCDS_FLAG_COMPRESS bit in the flags of compressed objects will be used by the library iff the compression is enabled.