Skip to content

acorretti/gsnappy-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gsnappy-cli

Go Reference Go Report Card License: MIT GitHub release

Go CLI utility for Golang's Snappy compression/decompression block format. File and stdio capable.

Compatible with Google C++, Xerial Java and snappyjs JavaScript implementations.

Install

go install github.com/acorretti/gsnappy-cli/cmd/gsnappy@latest

Usage

NAME:
   gsnappy - Snappy compression utility

USAGE:
   gsnappy [global options] command [command options] [arguments...]

VERSION:
   1.x

COMMANDS:
   c, compress    compress data
   d, decompress  decompress data
   help, h        Shows a list of commands or help for one command

GLOBAL OPTIONS:
   -i FILE, --input FILE   read input data from FILE (default: stdin)
   -o FILE, --output FILE  write output data to FILE (default: stdout)
   --help, -h              show help (default: false)
   --version, -v           print the version (default: false)

Compress from stdin, write to stdout:

gsnappy

(press Ctrl+D to stop input and run)

Compress from stdin, write to a file:

cat /tmp/input | gsnappy c -o /tmp/output

Decompress from stdin, write to stdout redirected to a file:

gsnappy d > /tmp/out

Decompress a file, write to another file:

gsnappy d -i /tmp/input -o /tmp/output

About

Go CLI utility for Golang's Snappy compression block format. File and stdio capable.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages