package
Version:
v1.6.7
Opens a new window with list of versions in this module.
Published: Dec 27, 2024
License: Apache-2.0, MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
Package pbytes contains tools for pooling byte pool.
Note that by default it reuse slices with capacity from 128 to 65536 bytes.
DefaultPool is used by pacakge level functions.
Get returns probably reused slice of bytes with capacity of c.
Get is a wrapper around DefaultPool.Get().
Put returns given slice to reuse pool.
Put is a wrapper around DefaultPool.Put().
Pool contains logic of reusing byte slices of various size.
New creates new Pool that reuses slices which size
Get returns probably reused slice of bytes with capacity of c.
Put returns given slice to reuse pool.
It does not reuse bytes whose size is not power of two or is out of pool
min/max range.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.