diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-09-27 20:49:12 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-09-27 20:49:12 +0200 |
commit | 26e6fdc64561d7575b3c937a9bb4f39cc8c0954f (patch) | |
tree | 7792b2f0824875006f1de4998056aa047e8eb008 /doc | |
parent | e7b6e8c60f0001c4b228bda570ec0d1b7dc3a739 (diff) | |
download | weechat-26e6fdc64561d7575b3c937a9bb4f39cc8c0954f.zip |
api: add function file_compress
Diffstat (limited to 'doc')
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 41 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 41 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 42 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 42 | ||||
-rw-r--r-- | doc/sr/weechat_plugin_api.sr.adoc | 42 |
5 files changed, 208 insertions, 0 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index b6093fd52..e3c416e0b 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -4189,6 +4189,47 @@ if (weechat_file_copy ("/tmp/test.txt", "/path/to/test2.txt")) [NOTE] This function is not available in scripting API. +==== file_compress + +_WeeChat ≥ 3.7._ + +Compress a file with gzip or zstd. + +Prototype: + +[source,c] +---- +int weechat_file_compress (const char *from, const char *to, + const char *compressor, int compression_level); +---- + +Arguments: + +* _from_: source file +* _to_: destination file +* _compressor_: the compressor to use, one of: +** _gzip_: gzip compression +** _zstd_: zstandard compression +* _compression_level_: compression level, between 1 (fast, low compression) to + 100 (slow, best compression) + +Return value: + +* 1 if OK, 0 if error + +C example: + +[source,c] +---- +if (weechat_file_compress ("/tmp/test.txt", "/tmp/test.txt.zst", "zstd", 50)) +{ + /* OK */ +} +---- + +[NOTE] +This function is not available in scripting API. + [[util]] === Util diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index f6d6af359..09b4fca84 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -4258,6 +4258,47 @@ if (weechat_file_copy ("/tmp/test.txt", "/path/to/test2.txt")) [NOTE] Cette fonction n'est pas disponible dans l'API script. +==== file_compress + +_WeeChat ≥ 3.7._ + +Compresser un fichier avec gzip ou zstd. + +Prototype : + +[source,c] +---- +int weechat_file_compress (const char *from, const char *to, + const char *compressor, int compression_level); +---- + +Paramètres : + +* _from_ : fichier source +* _to_ : fichier cible +* _compressor_ : le compresseur à utiliser, un parmi : +** _gzip_ : compression gzip +** _zstd_ : compression zstandard +* _compression_level_ : niveau de compression, entre 1 (rapide, peu de + compression) à 100 (lent, meilleure compression) + +Valeur de retour : + +* 1 si OK, 0 si erreur + +Exemple en C : + +[source,c] +---- +if (weechat_file_compress ("/tmp/test.txt", "/tmp/test.txt.zst", "zstd", 50)) +{ + /* OK */ +} +---- + +[NOTE] +Cette fonction n'est pas disponible dans l'API script. + [[util]] === Util diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index ddd9c2d4b..f7b75669b 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -4342,6 +4342,48 @@ if (weechat_file_copy ("/tmp/test.txt", "/path/to/test2.txt")) [NOTE] Questa funzione non è disponibile nelle API per lo scripting. +// TRANSLATION MISSING +==== file_compress + +_WeeChat ≥ 3.7._ + +Compress a file with gzip or zstd. + +Prototipo: + +[source,c] +---- +int weechat_file_compress (const char *from, const char *to, + const char *compressor, int compression_level); +---- + +Argomenti: + +* _from_: source file +* _to_: destination file +* _compressor_: the compressor to use, one of: +** _gzip_: gzip compression +** _zstd_: zstandard compression +* _compression_level_: compression level, between 1 (fast, low compression) to + 100 (slow, best compression) + +Valore restituito: + +* 1 if OK, 0 if error + +Esempio in C: + +[source,c] +---- +if (weechat_file_compress ("/tmp/test.txt", "/tmp/test.txt.zst", "zstd", 50)) +{ + /* OK */ +} +---- + +[NOTE] +Questa funzione non è disponibile nelle API per lo scripting. + [[util]] === Utilità diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 755974b45..bd9b6ea63 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -4258,6 +4258,48 @@ if (weechat_file_copy ("/tmp/test.txt", "/path/to/test2.txt")) [NOTE] スクリプト API ではこの関数を利用できません。 +// TRANSLATION MISSING +==== file_compress + +_WeeChat ≥ 3.7._ + +Compress a file with gzip or zstd. + +プロトタイプ: + +[source,c] +---- +int weechat_file_compress (const char *from, const char *to, + const char *compressor, int compression_level); +---- + +引数: + +* _from_: source file +* _to_: destination file +* _compressor_: the compressor to use, one of: +** _gzip_: gzip compression +** _zstd_: zstandard compression +* _compression_level_: compression level, between 1 (fast, low compression) to + 100 (slow, best compression) + +戻り値: + +* 1 if OK, 0 if error + +C 言語での使用例: + +[source,c] +---- +if (weechat_file_compress ("/tmp/test.txt", "/tmp/test.txt.zst", "zstd", 50)) +{ + /* OK */ +} +---- + +[NOTE] +スクリプト API ではこの関数を利用できません。 + [[util]] === ユーティリティ diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index a1e761a5f..4661e22e3 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -4053,6 +4053,48 @@ if (weechat_file_copy ("/tmp/test.txt", "/path/to/test2.txt")) Неке корисне функције. +// TRANSLATION MISSING +==== file_compress + +_WeeChat ≥ 3.7._ + +Compress a file with gzip or zstd. + +Прототип: + +[source,c] +---- +int weechat_file_compress (const char *from, const char *to, + const char *compressor, int compression_level); +---- + +Аргументи: + +* _from_: изворишни фајл +* _to_: одредишни фајл +* _compressor_: the compressor to use, one of: +** _gzip_: gzip compression +** _zstd_: zstandard compression +* _compression_level_: compression level, between 1 (fast, low compression) to + 100 (slow, best compression) + +Повратна вредност: + +* 1 ако је копирање OK, 0 у случају грешке + +C пример: + +[source,c] +---- +if (weechat_file_compress ("/tmp/test.txt", "/tmp/test.txt.zst", "zstd", 50)) +{ + /* OK */ +} +---- + +[NOTE] +Ова функција није доступна у API скриптовања. + ==== util_timeval_cmp Пореди две „timeval” структуре. |