add zstd
This commit is contained in:
parent
965a0d86d5
commit
40401087e4
2 changed files with 68 additions and 10 deletions
|
@ -12,23 +12,23 @@ rga is a line-oriented search tool that allows you to look for a [regex](../../t
|
|||
|
||||
## FLAGS:
|
||||
|
||||
| Option | Description |
|
||||
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Option | Description |
|
||||
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| --rga-accurate | Use more accurate but slower matching by [mime](../../files/MIME.md) type<br>By default, rga will match files using file extensions. Some programs,<br>such as sqlite3, don't care about the file extension at all, so users<br>sometimes use any or no extension at all. With this flag, rga will try<br>to detect the [mime](../../files/MIME.md) type of input files using the magic bytes (similar<br>to the [`file`](system/file.md) utility), and use that to choose the adapter. Detection is<br>only done on the first 8KiB of the file, since we can't always seek on the input (in archives). |
|
||||
| --rga-no-cache | Disable caching of results<br>By default, rga caches the extracted text, if it is small enough, to a<br>database in ${XDG_CACHE_DIR-~/.cache}/ripgrep-all on Linux,<br>~Library/Caches/ripgrep-all on macOS, or C:\\Users\\username\\AppData\\Local\\ripgrep-all on Windows. This way,<br>repeated searches on the same set of files will be much faster. If you<br>pass this flag, all caching will be disabled. |
|
||||
| --rga-list-adapters | List all known adapters |
|
||||
| --rga-print-config-schema | Print the [JSON Schema](../../tools/JSON%20Schema.md) of the configuration file |
|
||||
| --rg-help | Show help for [ripgrep](ripgrep.md) itself |
|
||||
| --rg-version | Show version of [ripgrep](ripgrep.md) itself |
|
||||
| -V, --version | Prints version information |
|
||||
| --rga-no-cache | Disable caching of results<br>By default, rga caches the extracted text, if it is small enough, to a<br>database in ${XDG_CACHE_DIR-~/.cache}/ripgrep-all on Linux,<br>~Library/Caches/ripgrep-all on macOS, or C:\\Users\\username\\AppData\\Local\\ripgrep-all on Windows. This way,<br>repeated searches on the same set of files will be much faster. If you<br>pass this flag, all caching will be disabled. |
|
||||
| --rga-list-adapters | List all known adapters |
|
||||
| --rga-print-config-schema | Print the [JSON Schema](../../tools/JSON%20Schema.md) of the configuration file |
|
||||
| --rg-help | Show help for [ripgrep](ripgrep.md) itself |
|
||||
| --rg-version | Show version of [ripgrep](ripgrep.md) itself |
|
||||
| -V, --version | Prints version information |
|
||||
|
||||
## OPTIONS:
|
||||
|
||||
| Option | Description |
|
||||
| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| --rga-adapters=\<adapters\>... | Change which adapters to use and in which priority order (descending)<br>"foo,bar" means use only adapters foo and bar. "-bar,baz" means use all default adapters except for bar and baz. "+bar,baz" means use all default adapters and also bar and baz. |
|
||||
| --rga-cache-compression-level=\<compression-level\> | ZSTD compression level to apply to adapter outputs before storing in<br>cache db<br>Ranges from 1 - 22 \[default: 12\] |
|
||||
| --rga-config-file=\<config-file-path\> | |
|
||||
| --rga-cache-compression-level=\<compression-level\> | [ZSTD compression](../../files/Zstd%20Compression.md) level to apply to adapter outputs before storing in<br>cache db<br>Ranges from 1 - 22 \[default: 12\] |
|
||||
| --rga-config-file=\<config-file-path\> | |
|
||||
| --rga-max-archive-recursion=\<max-archive-recursion\> | Maximum nestedness of archives to recurse into \[default: 5\] |
|
||||
| --rga-cache-max-blob-len=\<max-blob-len\> | Max compressed size to cache<br>Longest byte length (after compression) to store in cache. Longer<br>adapter outputs will not be cached and recomputed every time.<br>Allowed suffixes on command line: k M G \[default: 2000000\] |
|
||||
| --rga-cache-path=\<path\> | Path to store cache db \[default: /home/user/.cache/ripgrep-all\] |
|
||||
|
|
58
technology/files/Zstd Compression.md
Normal file
58
technology/files/Zstd Compression.md
Normal file
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
obj: concept
|
||||
aliases: ["zstd"]
|
||||
repo: https://github.com/facebook/zstd
|
||||
wiki: https://en.wikipedia.org/wiki/Zstd
|
||||
---
|
||||
|
||||
# Zstd
|
||||
Zstandard, also known as zstd, is a fast lossless compression algorithm. It offers both excellent compression ratios and high-speed compression and decompression. Zstandard is designed to be highly versatile, suitable for a wide range of applications from data compression to streaming and archiving.
|
||||
|
||||
## Features
|
||||
### High Compression Ratios
|
||||
Zstandard achieves competitive compression ratios compared to other compression algorithms like gzip, lz4, and [xz](XZ%20Compression.md). It offers the flexibility to adjust compression levels according to specific requirements, balancing between speed and compression efficiency.
|
||||
|
||||
### High-Speed Compression and Decompression
|
||||
One of the key strengths of Zstandard is its impressive speed. It is optimized for both compression and decompression, making it suitable for scenarios where fast processing is essential, such as real-time data streaming and high-performance computing.
|
||||
|
||||
### Streaming Compression
|
||||
Zstandard supports streaming compression and decompression, allowing data to be compressed or decompressed in chunks without needing to hold the entire dataset in memory. This feature is particularly useful for applications dealing with large datasets or continuous streams of data.
|
||||
|
||||
### Dictionary Compression
|
||||
Zstandard includes support for dictionary compression, where a predefined dictionary can be used to improve compression ratios for specific types of data. This feature is beneficial for scenarios where the data has a predictable structure or repeating patterns.
|
||||
|
||||
### Multi-Threading Support
|
||||
Zstandard utilizes multi-threading to leverage the processing power of modern multi-core CPUs, speeding up compression and decompression tasks even further. This feature enhances performance, especially on systems with multiple CPU cores.
|
||||
|
||||
## Usage
|
||||
Usage: `zstd [OPTIONS...] [INPUT... | -] [-o OUTPUT]`
|
||||
|
||||
### Options
|
||||
| Option | Description |
|
||||
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `-o OUTPUT` | Write output to a single file, OUTPUT. |
|
||||
| `-k, --keep` | Preserve INPUT file(s). \[Default] |
|
||||
| `--rm` | Remove INPUT file(s) after successful (de)compression. |
|
||||
| `-#` | Desired compression level, where `#` is a number between 1 and 19; lower numbers provide faster compression, higher numbers yield better compression ratios. \[Default: 3] |
|
||||
| `-d, --decompress` | Perform decompression. |
|
||||
| `-D DICT` | Use DICT as the dictionary for compression or decompression. |
|
||||
| `-f, --force` | Disable input and output checks. Allows overwriting existing files, receiving input from the console, printing output to STDOUT, and operating on links, block devices, etc. |
|
||||
| `-c, --stdout` | Write to STDOUT (even if it is a console) and keep the INPUT file(s). |
|
||||
| `-v, --verbose` | Enable verbose output; pass multiple times to increase verbosity. |
|
||||
| `-q, --quiet` | Suppress warnings; pass twice to suppress errors. |
|
||||
| `--[no-]progress` | Forcibly show/hide the progress counter. NOTE: Any (de)compressed output to terminal will mix with progress counter text. |
|
||||
| `-r` | Operate recursively on directories. |
|
||||
| `--filelist LIST` | Read a list of files to operate on from LIST. |
|
||||
| `--output-dir-flat DIR` | Store processed files in DIR. |
|
||||
| `--output-dir-mirror DIR` | Store processed files in DIR, respecting original directory structure. |
|
||||
| `--[no-]asyncio` | Use asynchronous IO. \[Default: Enabled] |
|
||||
| `--[no-]check` | Add XXH64 integrity checksums during compression. \[Default: Add, Validate] If `-d` is present, ignore/validate checksums during decompression. |
|
||||
| `--ultra` | Enable levels beyond 19, up to 22; requires more memory. |
|
||||
| `--fast[=#]` | Use to very fast compression levels. \[Default: 1] |
|
||||
| `--long[=#]` | Enable long distance matching with window log `#`. \[Default: 27] |
|
||||
| `-T#` | Spawn # compression threads. \[Default: 1; pass 0 for core count.] |
|
||||
| `-l` | Print information about Zstandard-compressed files. |
|
||||
| `--test` | Test compressed file integrity. |
|
||||
| `-M#` | Set the memory usage limit to # megabytes. |
|
||||
| `--[no-]sparse` | Enable sparse mode. \[Default: Enabled for files, disabled for STDOUT.] |
|
||||
| `--[no-]pass-through` | Pass through uncompressed files as-is. \[Default: Disabled] |
|
Loading…
Reference in a new issue