...

Package zstd

import "internal/zstd"
Overview
Index

Overview ▾

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

type Reader

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

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

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.