From 65b7d32841109d6879d49f7a29421efd1fa4735d Mon Sep 17 00:00:00 2001 From: "kayos@tcp.direct" Date: Fri, 4 Feb 2022 00:05:33 -0800 Subject: [PATCH] Add: squish docs --- squish/README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 squish/README.md diff --git a/squish/README.md b/squish/README.md new file mode 100644 index 0000000..5ba24bd --- /dev/null +++ b/squish/README.md @@ -0,0 +1,43 @@ +# squish +-- + import "git.tcp.direct/kayos/common/squish" + +## Usage + +#### func B64d + +```go +func B64d(str string) (data []byte) +``` +B64d decodes the given string into the original slice of bytes. Do note that +this is for non critical tasks, it has no error handling for purposes of clean +code. + +#### func B64e + +```go +func B64e(cytes []byte) (data string) +``` +B64e encodes the given slice of bytes into base64 standard encoding. + +#### func Gunzip + +```go +func Gunzip(data []byte) ([]byte, error) +``` +Gunzip decompresses a gzip compressed slice of bytes. + +#### func Gzip + +```go +func Gzip(data []byte) ([]byte, error) +``` +Gzip compresses as slice of bytes using gzip compression. + +#### func UnpackStr + +```go +func UnpackStr(encoded string) string +``` +UnpackStr UNsafely unpacks (usually banners) that have been base64'd and then +gzip'd.