bpool

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PutByteBuffer

func PutByteBuffer(bb *ByteBuffer)

PutByteBuffer returns bb to the pool.

Types

type ByteBuffer

type ByteBuffer struct {
	// B is the underlying byte slice.
	B []byte
}

ByteBuffer implements a simple byte buffer.

func GetByteBuffer

func GetByteBuffer(length int) *ByteBuffer

GetByteBuffer returns byte buffer with the given capacity.

func (*ByteBuffer) Reset

func (bb *ByteBuffer) Reset()

Reset resets bb.

func (*ByteBuffer) Write

func (bb *ByteBuffer) Write(p []byte) (int, error)

Write appends p to bb.

Jump to

Keyboard shortcuts

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