snp

command module
v0.0.0-...-ffdb2f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2021 License: MIT Imports: 6 Imported by: 0

README

snp: command-line Snappy

Installation

go get -u github.com/iancmcc/snp

Or download the appropriate artifact for your platform from the Releases.

Usage

Usage of snp:
  -b    Output compressed data as binary instead of a base64-encoded string
  -d    Decode from stdin

With no arguments, snp compresses stdin using Snappy and outputs a base64-encoded result. When -b is passed, it will output the compressed data as binary.

When -d is passed, snp will uncompress the input, automatically decoding base64 first if detected.

Example

# Note base64 output by default

$ echo "Hi There" | snp
CSBIaSBUaGVyZQo=

# Note automatic base64 decoding

$ echo "Hi There" | snp | snp -d
Hi There

# Also decodes when it's straight binary

$ echo "Hi There" | snp -b | snp -d
Hi There

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL