compress

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

* Package compress provides utility api for gzip and snappy compress

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressUint64 added in v1.0.10

func CompressUint64(v uint64) []byte

CompressUint64 convert uint64 to byte slice and compress if need

func DecompressUint6 added in v1.0.10

func DecompressUint6(b []byte) (v uint64, n int)

DecompressUint6 convert byte slice to uint64

func GUNZIP

func GUNZIP(b []byte) ([]byte, error)

GUNZIP do unzip action by gzip package

func GZIP

func GZIP(b []byte) ([]byte, error)

GZIP do gzip action by gzip package

func SnappyDecode

func SnappyDecode(b []byte) ([]byte, error)

SnappyDecode do unCompress by snappy

func SnappyEncode

func SnappyEncode(b []byte) []byte

SnappyEncode do compress by snappy

func UnzipFile

func UnzipFile(file, password, outputdir string) error

UnzipFile unzip the target zip file to output directory

func ZipDir

func ZipDir(dir, zipfile, password string) error

ZipDir zip the target directory's all file into one zip file

Types

This section is empty.

Jump to

Keyboard shortcuts

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