diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-12-24 15:14:56 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-12-24 16:45:57 +0100 |
commit | 498194f6fc39ce96f17f5002aab7b0aa0a5e6f67 (patch) | |
tree | 80b2d9c1ec6b43fe86aacdf8e0e93c07232966a0 /src/plugins/relay/relay-config.c | |
parent | d5c391b1ee57730ed6f94c3d7ee5661ceaff35f5 (diff) | |
download | weechat-498194f6fc39ce96f17f5002aab7b0aa0a5e6f67.zip |
relay: add zstd compression in weechat protocol
Option relay.network.compression_level is renamed to relay.network.compression
and is now a percentage between 0 (no compression) to 100 (best compression,
slowest).
Compression is now disabled by default in weechat protocol and must be enabled
via the `handshake` command (option `compression` has been removed from `init`
command).
Diffstat (limited to 'src/plugins/relay/relay-config.c')
-rw-r--r-- | src/plugins/relay/relay-config.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c index 790a38a53..3e85e182e 100644 --- a/src/plugins/relay/relay-config.c +++ b/src/plugins/relay/relay-config.c @@ -63,7 +63,7 @@ struct t_config_option *relay_config_network_allowed_ips; struct t_config_option *relay_config_network_auth_timeout; struct t_config_option *relay_config_network_bind_address; struct t_config_option *relay_config_network_clients_purge_delay; -struct t_config_option *relay_config_network_compression_level; +struct t_config_option *relay_config_network_compression; struct t_config_option *relay_config_network_ipv6; struct t_config_option *relay_config_network_max_clients; struct t_config_option *relay_config_network_nonce_size; @@ -1070,13 +1070,16 @@ relay_config_init () "clients immediately, -1 = never purge)"), NULL, -1, 60 * 24 * 30, "0", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - relay_config_network_compression_level = weechat_config_new_option ( + relay_config_network_compression = weechat_config_new_option ( relay_config_file, ptr_section, - "compression_level", "integer", - N_("compression level for packets sent to client with WeeChat protocol " - "(0 = disable compression, 1 = low compression ... 9 = best " - "compression)"), - NULL, 0, 9, "6", NULL, 0, + "compression", "integer", + N_("compression for packets sent to client with WeeChat " + "protocol: 0 = disable compression, 1 = low compression, fast " + "... 100 = best compression, slow; the value is a percentage " + "converted to 1-9 for zlib and 1-19 for zstd; " + "default value is 20 which is a sane default and offers good " + "compression and speed"), + NULL, 0, 100, "20", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); relay_config_network_ipv6 = weechat_config_new_option ( relay_config_file, ptr_section, |