Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/valyala/bytebufferpool
/ functions
Functions
39 in github.com/valyala/bytebufferpool
⨍
Functions
39
◇
Types & classes
4
↓ 11 callers
Function
testIndex
(t *testing.T, n, expectedIdx int)
pool_test.go:26
↓ 5 callers
Function
testGetPut
(t *testing.T, n int)
pool_test.go:79
↓ 4 callers
Method
Reset
Reset makes ByteBuffer.B empty.
bytebuffer.go:109
↓ 4 callers
Method
Write
Write implements io.Writer - it appends p to ByteBuffer.B
bytebuffer.go:72
↓ 4 callers
Method
WriteString
WriteString appends s to ByteBuffer.B.
bytebuffer.go:88
↓ 3 callers
Function
Get
Get returns an empty byte buffer from the pool. Got byte buffer may be returned to the pool via Put call. This reduces the number of memory allocatio
pool.go:42
↓ 3 callers
Function
Put
Put returns byte buffer to the pool. ByteBuffer.B mustn't be touched after returning it to the pool. Otherwise data races will occur.
pool.go:62
↓ 2 callers
Method
Get
Get returns new byte buffer with zero length. The byte buffer may be returned to the pool via Put after the use in order to minimize GC overhead.
pool.go:48
↓ 2 callers
Method
Put
Put releases byte buffer obtained via Get to the pool. The buffer mustn't be accessed after returning to the pool.
pool.go:67
↓ 2 callers
Function
index
(n int)
pool.go:139
↓ 2 callers
Function
testByteBufferGetPut
(t *testing.T)
bytebuffer_test.go:92
↓ 2 callers
Function
testByteBufferGetString
(t *testing.T)
bytebuffer_test.go:105
↓ 2 callers
Function
testPoolVariousSizes
(t *testing.T)
pool_test.go:65
↓ 1 callers
Method
Bytes
Bytes returns b.B, i.e. all the bytes accumulated in the buffer. The purpose of this function is bytes.Buffer compatibility.
bytebuffer.go:67
↓ 1 callers
Method
Len
Len returns the size of the byte buffer.
bytebuffer.go:20
↓ 1 callers
Method
ReadFrom
ReadFrom implements io.ReaderFrom. The function appends all the data read from r to b.
bytebuffer.go:27
↓ 1 callers
Method
SetString
SetString sets ByteBuffer.B to s.
bytebuffer.go:99
↓ 1 callers
Method
String
String returns string representation of ByteBuffer.B.
bytebuffer.go:104
↓ 1 callers
Method
WriteTo
WriteTo implements io.WriterTo.
bytebuffer.go:59
↓ 1 callers
Function
allocNBytes
(dst []byte, n int)
pool_test.go:88
↓ 1 callers
Method
calibrate
()
pool.go:81
Function
BenchmarkByteBufferWrite
(b *testing.B)
bytebuffer_timing_test.go:8
Function
BenchmarkBytesBufferWrite
(b *testing.B)
bytebuffer_timing_test.go:21
Function
ExampleByteBuffer
()
bytebuffer_example_test.go:9
Method
Len
()
pool.go:127
Method
Less
(i, j int)
pool.go:131
Method
Set
Set sets ByteBuffer.B to p.
bytebuffer.go:94
Method
Swap
(i, j int)
pool.go:135
Function
TestByteBufferGetPutConcurrent
(t *testing.T)
bytebuffer_test.go:73
Function
TestByteBufferGetPutSerial
(t *testing.T)
bytebuffer_test.go:69
Function
TestByteBufferGetStringConcurrent
(t *testing.T)
bytebuffer_test.go:121
Function
TestByteBufferGetStringSerial
(t *testing.T)
bytebuffer_test.go:117
Function
TestByteBufferReadFrom
(t *testing.T)
bytebuffer_test.go:11
Function
TestByteBufferWriteTo
(t *testing.T)
bytebuffer_test.go:45
Function
TestIndex
(t *testing.T)
pool_test.go:9
Function
TestPoolCalibrate
(t *testing.T)
pool_test.go:33
Function
TestPoolVariousSizesConcurrent
(t *testing.T)
pool_test.go:47
Function
TestPoolVariousSizesSerial
(t *testing.T)
pool_test.go:43
Method
WriteByte
WriteByte appends the byte c to the buffer. The purpose of this function is bytes.Buffer compatibility. The function always returns nil.
bytebuffer.go:82