chunkbuf

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: AGPL-3.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkBuffer

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

ChunkBuffer represents a custom buffer struct with Read/Write and Seek support.

func NewChunkBuffer

func NewChunkBuffer(data []byte) *ChunkBuffer

NewChunkBuffer returns a ChunkBuffer with the given data. if data is nil a ChunkBuffer with 64k is returned. Note that chunkbuf will take over ownership over the buf.

func (*ChunkBuffer) Close

func (c *ChunkBuffer) Close() error

Close is a no-op only existing to fulfill io.Closer

func (*ChunkBuffer) Len

func (c *ChunkBuffer) Len() int

func (*ChunkBuffer) Read

func (c *ChunkBuffer) Read(p []byte) (int, error)

func (*ChunkBuffer) Reset

func (c *ChunkBuffer) Reset()

func (*ChunkBuffer) Seek

func (c *ChunkBuffer) Seek(offset int64, whence int) (int64, error)

func (*ChunkBuffer) Write

func (c *ChunkBuffer) Write(p []byte) (int, error)

func (*ChunkBuffer) WriteTo

func (c *ChunkBuffer) WriteTo(w io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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