ioutil

package
v0.0.0-...-2b7ea9d Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: CC-BY-SA-4.0, MIT, MIT-0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockReader

type BlockReader struct {
	ChunkSize uint64
	// contains filtered or unexported fields
}

func NewBlockReader

func NewBlockReader(reader io.Reader, chunkSize uint64) *BlockReader

func (*BlockReader) Read

func (br *BlockReader) Read(b []byte) (int, error)

This is for convenience

func (*BlockReader) ReadBlock

func (br *BlockReader) ReadBlock() ([]byte, error)

func (*BlockReader) Realign

func (br *BlockReader) Realign() error

type BlockWriter

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

func NewBlockWriter

func NewBlockWriter(destination io.Writer, blockSize uint64) *BlockWriter

func (*BlockWriter) Align

func (k *BlockWriter) Align() error

func (*BlockWriter) Close

func (k *BlockWriter) Close() error

func (*BlockWriter) Write

func (k *BlockWriter) Write(p []byte) (n int, err error)

Writes bytes to the

func (*BlockWriter) WriteWhole

func (k *BlockWriter) WriteWhole(p []byte) (n int, err error)

type BrotliWriter

type BrotliWriter struct{}

func (BrotliWriter) Copy

func (compressor BrotliWriter) Copy(reader io.Reader, writer io.Writer) (int64, error)

type CompressWriter

type CompressWriter interface {
	// Compress reads from a Reader until there is no more to read,
	// compresses it into the writer,
	// and returns the bytes read, bytes written, and any error.
	Copy(io.Writer, io.Reader) (int64, error)
}

type CopyWriter

type CopyWriter struct {
	CompressWriter
}

func (CopyWriter) Copy

func (compressor CopyWriter) Copy(reader io.Reader, writer io.Writer) (int64, error)

type HashWriter

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

func NewHashWriter

func NewHashWriter(dest io.Writer, hasher hash.Hash) *HashWriter

func (*HashWriter) Sum

func (w *HashWriter) Sum() []byte

func (*HashWriter) Write

func (w *HashWriter) Write(b []byte) (int, error)

type Pump

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

func NewPump

func NewPump(reader io.Reader, pipe io.ReadWriter) *Pump

func (*Pump) Read

func (pump *Pump) Read(buf []byte) (int64, error)

type ZstdWriter

type ZstdWriter struct {
	Dictionary []byte
}

func (ZstdWriter) Copy

func (compressor ZstdWriter) Copy(reader io.Reader, writer io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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