Categorygithub.com/andrew-d/bytebuf
modulepackage
0.0.2
Repository: https://github.com/andrew-d/bytebuf.git
Documentation: pkg.go.dev

# README

bytebuf

Go Reference CI Status

bytebuf is a library that provides an interface for a concurrency-safe read-only buffer of bytes, constructors from a variety of types, along with some optimized implementations for copying said buffers to files, network connections, etc.

# Functions

Append appends one ByteBuf to another.
Empty creates an empty ByteBuf.
NewFromBytesReader creates a ByteBuf from an underlying file.
NewFromFile creates a ByteBuf from an underlying file.
NewFromReader creates a ByteBuf from an io.Reader.
NewFromSlice creates a ByteBuf from an underlying slice.
NewFromSlices creates a ByteBuf from multiple slices.
NewFromString creates a ByteBuf from an underlying string.
ReadAll reads an entire ByteBuf into a byte slice and returns it.

# Interfaces

ByteBuf is an interface for a concurrency-safe read-only buffer of bytes that can be read in a variety of ways.