diff options
| author | Joe Tsai <joetsai@digital-static.net> | 2022-04-13 13:21:30 -0700 |
|---|---|---|
| committer | Joseph Tsai <joetsai@digital-static.net> | 2022-04-15 01:19:37 +0000 |
| commit | 35a92f92bd0ce15c658dd6794238ca90b71e4422 (patch) | |
| tree | acc7417aac6fed9129f6c623843531fe72280f69 /api | |
| parent | 5a4f0b6f1e6d3c022ee30884590526ab7d3f580b (diff) | |
| download | go-35a92f92bd0ce15c658dd6794238ca90b71e4422.tar.xz | |
encoding/binary: add AppendVarint AppendUvarint
This adds a straight-forward implementation of the functionality.
A more performant version could be added that unrolls the loop
as is done in google.golang.org/protobuf/encoding/protowire,
but usages that demand high performance can use that package instead.
Fixes #51644
Change-Id: I9d3b615a60cdff47e5200e7e5d2276adf4c93783
Reviewed-on: https://go-review.googlesource.com/c/go/+/400176
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'api')
| -rw-r--r-- | api/next/51644.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/api/next/51644.txt b/api/next/51644.txt new file mode 100644 index 0000000000..d93dbbf184 --- /dev/null +++ b/api/next/51644.txt @@ -0,0 +1,2 @@ +pkg encoding/binary, func AppendUvarint([]uint8, uint64) []uint8 #51644 +pkg encoding/binary, func AppendVarint([]uint8, int64) []uint8 #51644 |
