Skip to content

NewMemoryWriter

Choose a tag to compare

@djherbis djherbis released this 23 Apr 14:18
731a535

NewMemoryWriter allows for preallocation of the internal buffer via bufit.NewBuffer(bufit.NewMemoryWriter(make([]byte, 0, CAPACITY))), this can avoid stuttering since the buffer doesn't need to grow as many times to start.