package zstd

import "internal/zstd"

Package zstd provides a decompressor for zstd streams, described in RFC 8878. It does not support dictionaries.

Index

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader implements io.Reader to read a zstd compressed stream.

func NewReader

func NewReader(input io.Reader) *Reader

NewReader creates a new Reader that decompresses data from the given reader.

func (*Reader) Read

func (r *Reader) Read(p []byte) (int, error)

Read implements io.Reader.

func (*Reader) ReadByte

func (r *Reader) ReadByte() (byte, error)

ReadByte implements io.ByteReader.

func (*Reader) Reset

func (r *Reader) Reset(input io.Reader)

Reset discards the current state and starts reading a new stream from r. This permits reusing a Reader rather than allocating a new one.