The speedup comes from multiple sources: 1. We now preallocate a byte slice, instead of appending multiple times. 2. Marshaling into a byte slice is faster than using a bytes.Buffer. 3. quicvarint.Write allocates, while quicvarint.Append doesn't.
* run gofmt -s -w * stop using the deprecated io/ioutil package * update golangci-lint action to v3, golangci-lint to v1.48.0