What Data Compression Algorithms Does CSS Use?

CSS supports two data compression algorithms: LZ4 (by default) and best_compression.

Run the following command to switch the default compression algorithm (LZ4) to best_compression:
PUT index-1
{
    "settings": {
        "index": {
            "codec": "best_compression"
        }
    }
}

The LZ4 algorithm can quickly compress and decompress data while the best_compression algorithm has a higher compression and decompression ratio.