compress

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 5 Imported by: 0

README

compress

Simply compressor, support zlib/gzip/flate/lzw.

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

Installation

To install the package, run:

go get github.com/go-zoox/compress

Getting Started

package main

import (
	"fmt"

	"github.com/go-zoox/compress"
)

func main() {
	gzip := compress.NewGzip()
	bytes := gzip.Compress([]byte("hello world"))
	bytes2, _ := gzip.Decompress(bytes)
	fmt.Println(string(bytes2))
}

Try in Go Playground.

Inspired By

License

GoZoox is released under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "1.0.1"

Version is the current version of the package.

Functions

func NewFlate

func NewFlate(bufSize ...int) *compressor.Compressor

NewFlate creates a flate compressor.

func NewGzip

func NewGzip(bufSize ...int) *compressor.Compressor

NewGzip creates a gzip compressor.

func NewLZW

func NewLZW(bufSize ...int) *compressor.Compressor

NewLZW creates a lzw compressor.

func NewZlib

func NewZlib(bufSize ...int) *compressor.Compressor

NewZlib creates a zlib compressor.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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