#gzip #nu #zstd #plugin

bin+lib nu_plugin_compress

A nushell plugin for compression and decompression, supporting zstd, gzip, bzip2, and xz

7 releases

0.2.5 Apr 2, 2025
0.2.4 Mar 2, 2025
0.2.3 Jan 8, 2025
0.2.1 Dec 28, 2024
0.1.0 Sep 21, 2024

#543 in Compression

Download history 287/week @ 2025-01-04 48/week @ 2025-01-11 1/week @ 2025-01-18 2/week @ 2025-02-01 1/week @ 2025-02-08 4/week @ 2025-02-22 167/week @ 2025-03-01 15/week @ 2025-03-08 3/week @ 2025-03-15 1/week @ 2025-03-22 117/week @ 2025-03-29 38/week @ 2025-04-05 7/week @ 2025-04-12 4/week @ 2025-04-19

167 downloads per month

Apache-2.0 and maybe CC-PDDC

16KB
243 lines

crates.io docs.rs

nu_plugin_compress

A nushell plugin for compression and decompression, supporting zstd, gzip, bzip2, and xz.

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
# archive and compress
tar cvf - hello.txt | to gz | save hello.tar.gz
# decompress and unarchive
open hello.tar.gz | tar xvf -

Example

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

Dependencies

~29–59MB
~1M SLoC