zlib

package
v0.7.17 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(v []byte) ([]byte, error)

Compress is a function that compresses a string using gzip compression.

Parameters:

  • v: A string representing the value to compress.

Returns:

  • A byte slice representing the compressed value.
  • An error if there was an error compressing the value.

Example usage:

compressed, err := Compress("value") // compressed == []byte{...}, err == nil

func Decompress

func Decompress(v []byte) (string, error)

Decompress is a function that decompresses a byte slice using gzip decompression.

Parameters:

  • v: A byte slice representing the compressed value to decompress.

Returns:

  • A string representing the decompressed value.
  • An error if there was an error decompressing the value.

Example usage:

decompressed, err := Decompress([]byte{...}) // decompressed == "value", err == nil

Types

This section is empty.

Jump to

Keyboard shortcuts

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