zstd
A compression codec Kafka supports that usually gives the best ratio for the time it costs.
Producers set compression.type=zstd to compress whole record batches. It typically shrinks data more than gzip at a similar or lower processor cost, which is why it is a common choice for high-volume topics.