What is the function of the compression-level option in the br tool?

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: br工具的compression-level选项有什么作用

| username: 滴滴嗒嘀嗒

[Test Environment for TiDB]
[TiDB Version]
[Reproduction Path] What operations were performed to encounter the issue
When using br for backup, adding the --compression-level option and passing values 1, 2, 100, 100000 respectively, I observed the logs and the generated backup files but did not find any significant differences. What is the specific function of this option?
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

Backup Files:

| username: xfworld | Original post link

The corresponding compression ratio (default compression mode: zstd)

Refer to this post:

| username: xfworld | Original post link

Your data is not large enough. In scenarios with large enough data, the difference after compression will be relatively large. Decompression will also consume more CPU power and will become slower.

| username: 滴滴嗒嘀嗒 | Original post link

This value is only specified as int32, which has a very large range (-2147483648 ~ 2147483647). So, what do the values I provided mean? Can negative numbers be given?

| username: 滴滴嗒嘀嗒 | Original post link

This compression ratio corresponds to the option of choosing the compression algorithm—
What I want to ask about is the compression level option—