stdlibzstd

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: BSD-3-Clause-Clear Imports: 5 Imported by: 0

README

stdlibzstd

internal-only standard library zstd decompressor written by the go team (RSC?), stolen from the go1.25 internal/zstd library. I deleted the tests because they reference other internal-only packages I don't want to vendor here.

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

Jump to

Keyboard shortcuts

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