encapsulation.paddingBuffer can be statically allocated.

This commit is contained in:
David Fifield 2022-09-22 16:52:51 -06:00
parent 4ae63eccab
commit a579c969e6

View file

@ -138,7 +138,7 @@ func WriteData(w io.Writer, data []byte) (int, error) {
return total, err return total, err
} }
var paddingBuffer = make([]byte, 1024) var paddingBuffer [1024]byte
// WritePadding encodes padding chunks, whose total size (including their own // WritePadding encodes padding chunks, whose total size (including their own
// length prefixes) is n. Returns the total number of bytes written to w, which // length prefixes) is n. Returns the total number of bytes written to w, which