Source File
pbytes.go
Belonging Package
github.com/gobwas/pool/pbytes
// Package pbytes contains tools for pooling byte pool.// Note that by default it reuse slices with capacity from 128 to 65536 bytes.package pbytes// DefaultPool is used by pacakge level functions.var DefaultPool = New(128, 65536)// Get returns probably reused slice of bytes with at least capacity of c and// exactly len of n.// Get is a wrapper around DefaultPool.Get().func (, int) []byte { return DefaultPool.Get(, ) }// GetCap returns probably reused slice of bytes with at least capacity of n.// GetCap is a wrapper around DefaultPool.GetCap().func ( int) []byte { return DefaultPool.GetCap() }// GetLen returns probably reused slice of bytes with at least capacity of n// and exactly len of n.// GetLen is a wrapper around DefaultPool.GetLen().func ( int) []byte { return DefaultPool.GetLen() }// Put returns given slice to reuse pool.// Put is a wrapper around DefaultPool.Put().func ( []byte) { DefaultPool.Put() }
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |