nu_plugin_compress

Crates.ionu_plugin_compress
lib.rsnu_plugin_compress
version0.1.0
sourcesrc
created_at2024-09-21 06:42:21.693253
updated_at2024-09-21 06:42:21.693253
descriptionA nushell plugin for compression and decompression, supporting zstd, gzip, bzip2, and xz.
homepagehttps://github.com/yybit/nu_plugin_compress
repositoryhttps://github.com/yybit/nu_plugin_compress
max_upload_size
id1381989
size64,072
(yybit)

documentation

README

crates.io docs.rs

nu_plugin_compress

A nushell plugin for compression and decompression, supporting zstd, gzip, bzip2, and xz. Require nushell >= 0.98.0.

Status

Supported compression formats include:

Type Compress Command Decompress Command
gzip to gz from gz
zstd to zst from zst
xz to xz from xz
bzip2 to bz2 from bz2

Installation

cargo install nu_plugin_compress
plugin add ~/.cargo/bin/nu_plugin_compress
plugin use compress

Usage

# compress and save
"hello" | to gz | save hello.gz
# compress with level 7, Default level is 3
"hello" | to xz -l 7
# decompress and print
open hello.gz | decode

Example

> open hello.gz
Length: unknown (stream) | printable whitespace ascii_other non_ascii
00000000:   68 65 6c 6c  6f                                      hello
Commit count: 5

cargo fmt