From 10a3129049a15e2f7e0defaaf2dde53149937c48 Mon Sep 17 00:00:00 2001 From: buengese Date: Mon, 14 Sep 2020 23:45:01 +0200 Subject: [PATCH] press: initial documentation --- docs/content/_index.md | 1 + docs/content/press.md | 137 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 docs/content/press.md diff --git a/docs/content/_index.md b/docs/content/_index.md index 51af844d4..21c26fa5c 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -44,6 +44,7 @@ using local disk. Virtual backends wrap local and cloud file systems to apply [encryption](/crypt/), [caching](/cache/), +[compression](/press/) [chunking](/chunker/) and [joining](/union/). diff --git a/docs/content/press.md b/docs/content/press.md new file mode 100644 index 000000000..2049c0210 --- /dev/null +++ b/docs/content/press.md @@ -0,0 +1,137 @@ +--- +title: "Press" +description: "Compression Remote" +date: "2020-09-14" +--- + +Press (Experimental) +----------------------------------------- + +The `press` remote adds compression to another remote. It is best used with remotes containing +many large compressible files or on top of other remotes like crypt. + +Please read the [warnings](#warnings) before using this remote. + +To use this remote, all you need to do is specify another remote and a compression mode to use: + +``` +Current remotes: + +Name Type +==== ==== +remote_to_press sometype + +e) Edit existing remote +$ rclone config +n) New remote +d) Delete remote +r) Rename remote +c) Copy remote +s) Set configuration password +q) Quit config +e/n/d/r/c/s/q> n +name> press +... + 8 / Compress a remote + \ "press" +... +Storage> press +** See help for press backend at: https://rclone.org/press/ ** + +Remote to compress. +Enter a string value. Press Enter for the default (""). +remote> remote_to_press:subdir +Compression mode. +Enter a string value. Press Enter for the default ("gzip"). +Choose a number from below, or type in your own value + 1 / Gzip compression balanced for speed and compression strength. + \ "gzip" +compression_mode> gzip +Edit advanced config? (y/n) +y) Yes +n) No (default) +y/n> n +Remote config +-------------------- +[press] +type = press +remote = remote_to_press:subdir +compression_mode = gzip +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +``` + +### Compression Modes +Currently only gzip compression is supported, it provides a decent balance between speed and strength and is well +supported by other application. Compression strength can further be configured via an advanced setting where 0 is no +compression and 9 is strongest compression. + +#### Filetype +If you open a remote wrapped by press, you will see that there are many files with an extension corresponding to +the compression algorithm you chose. These files are standard files that can be opened by various archive programs, +but they have some hidden metadata that allows them to be used by rclone. +While you may download and decompress these files at will, do **not** upload any compressed files to a wrapped remote +through any other means than rclone. This will upload files that do not contain metadata and **will** cause unexpected behavior. + +### File names + +The compressed files will be named `*################.gz` where `*` is the base file and the `#` part is the size +of the uncompressed data written as a hexadecimal number. The file names should not be changed by anything other than +the rclone compression backend. + +#### Experimental +This remote is currently **experimental**. Things may break and data may be lost. Anything you do with this remote is +at your own risk. Please understand the risks associated with using experimental code and don't use this remote in +critical applications. + +{{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/press/press.go then run make backenddocs" >}} +### Standard Options + +Here are the standard options specific to press (Compress a remote). + +#### --press-remote + +Remote to compress. + +- Config: remote +- Env Var: RCLONE_PRESS_REMOTE +- Type: string +- Default: "" + +#### --press-mode + +Compression mode. + +- Config: mode +- Env Var: RCLONE_PRESS_MODE +- Type: string +- Default: "gzip" +- Examples: + - "gzip" + - Standard gzip compression with fastest parameters. + +### Advanced Options + +Here are the advanced options specific to press (Compress a remote). + +#### --press-level + +GZIP compression level (-2 to 9). + + Generally -1 (default, equivalent to 5) is recommended. + Levels 1 to 9 increase compressiong at the cost of speed.. Going past 6 + generally offers very little return. + + Level -2 uses Huffmann encoding only. Only use if you now what you + are doing + Level 0 turns off compression. + +- Config: level +- Env Var: RCLONE_PRESS_LEVEL +- Type: int +- Default: -1 + +{{< rem autogenerated options stop >}}