buffer

package
v0.0.0-...-b732d2a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 15

Documentation

Index

Constants

View Source
const DefaultCapacity = 512

DefaultCapacity is the size in bytes of a new BufferFile's backing buffer

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferFile

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

BufferFile allows reading parquet messages from a memory buffer.

func NewBufferFile

func NewBufferFile() *BufferFile

NewBufferFile creates new in memory parquet buffer.

func NewBufferFileCapacity

func NewBufferFileCapacity(cap int) *BufferFile

NewBufferFileCapacity starts the returned BufferFile with the given capacity

func NewBufferFileFromBytes

func NewBufferFileFromBytes(s []byte) *BufferFile

NewBufferFileFromBytes creates new in memory parquet buffer from the given bytes. It allocates a new slice and copy the contents of s.

func NewBufferFileFromBytesNoAlloc

func NewBufferFileFromBytesNoAlloc(s []byte) *BufferFile

NewBufferFileFromBytes creates new in memory parquet buffer from the given bytes. It uses the provided slice as its buffer.

func NewBufferFileFromBytesZeroAlloc

func NewBufferFileFromBytesZeroAlloc(s []byte) *BufferFile

NewBufferFileFromBytesZeroAlloc creates new in memory parquet buffer without memory allocation.

func (BufferFile) Bytes

func (bf BufferFile) Bytes() []byte

func (BufferFile) Close

func (bf BufferFile) Close() error

Close is a no-op for a memory buffer.

func (BufferFile) Create

func (bf BufferFile) Create(string) (source.ParquetFile, error)

func (BufferFile) Open

func (*BufferFile) Read

func (bf *BufferFile) Read(p []byte) (n int, err error)

Read reads data form BufferFile into p.

func (*BufferFile) Seek

func (bf *BufferFile) Seek(offset int64, whence int) (int64, error)

Seek seeks in the underlying memory buffer.

func (*BufferFile) Write

func (bf *BufferFile) Write(p []byte) (n int, err error)

Write writes data from p into BufferFile.

Jump to

Keyboard shortcuts

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