bytepool
Alloc temporary variable sized byte buffers from sync.Pools.
Example:
bs := bytepool.Alloc(134)
defer bytepool.Free(bs)
n,e := myfile.Read(bs)
bs = bs[0:n]
Variable sized pools of bytes using sync.Pools underneath.
go get github.com/taruti/bytepool
Alloc temporary variable sized byte buffers from sync.Pools.
Example:
bs := bytepool.Alloc(134)
defer bytepool.Free(bs)
n,e := myfile.Read(bs)
bs = bs[0:n]