bytes

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package bytes provides functions for decompressing byte streams.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadBytes

func ReadBytes(b []byte, alg string, dict []byte) (io.ReadCloser, error)

ReadBytes returns a ByteReader for a byte array with a given compression. alg may be "flate", "gzip", "none", "snappy", or "zlib".

func ReadFlateBytes

func ReadFlateBytes(b []byte, dict []byte) flate.ReadResetCloser

ReadFlateBytes returns a reader for reading flate bytes from an input array. Wraps the "compress/flate" package.

func ReadGzipBytes

func ReadGzipBytes(b []byte, multistream bool) (gzip.ReadResetCloser, error)

ReadGzipBytes returns a reader for reading gzip bytes from an input array. Wraps the "compress/gzip" package.

func ReadSnappyBytes

func ReadSnappyBytes(b []byte) snappy.ReadResetter

ReadSnappyBytes returns a reader for an input of snappy-compressed bytes, and an error if any.

func ReadZipBytes

func ReadZipBytes(b []byte) (io.ReadCloser, error)

ReadZipBytes returns a reader for reading from zip-compressed bytes.

func ReadZlibBytes

func ReadZlibBytes(b []byte, dict []byte) (zlib.ReadResetCloser, error)

ReadZlibBytes returns a reader for reading zlib bytes from an input slice. Wraps the "compress/zlib" package.

Types

type ByteReadScanner

type ByteReadScanner interface {
	io.Reader
	io.ByteReader
	io.ByteScanner
}

func ReadPlainBytes

func ReadPlainBytes(b []byte) ByteReadScanner

ReadPlainBytes returns a reader for reading the bytes from an input array, and an error if any.

type ByteReader

type ByteReader interface {
	io.Reader
	io.ByteReader
}

Jump to

Keyboard shortcuts

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