bytespool

package module
v0.0.0-...-cfcf97e Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 4 Imported by: 0

README

bytes pool

Simple []byte buffer pool for golang backend by sync.Pool.

Go Reference

package main

import "github.com/IrineSistiana/bytespool"

func main() {
	b := Get(1024)
	Release(b)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(size int) []byte

Note: The maximum reusable size is 2^30 (1GBytes). If size is too big, Get simply calls make([]byte,size) and ReleaseBuf is a noop.

func Release

func Release(b []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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