summaryrefslogtreecommitdiffstats
path: root/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/google.golang.org/protobuf/encoding/protowire/wire.go')
-rw-r--r--vendor/google.golang.org/protobuf/encoding/protowire/wire.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
index 9c61112f..ce57f57e 100644
--- a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
+++ b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
@@ -516,6 +516,7 @@ func EncodeTag(num Number, typ Type) uint64 {
}
// DecodeZigZag decodes a zig-zag-encoded uint64 as an int64.
+//
// Input: {…, 5, 3, 1, 0, 2, 4, 6, …}
// Output: {…, -3, -2, -1, 0, +1, +2, +3, …}
func DecodeZigZag(x uint64) int64 {
@@ -523,6 +524,7 @@ func DecodeZigZag(x uint64) int64 {
}
// EncodeZigZag encodes an int64 as a zig-zag-encoded uint64.
+//
// Input: {…, -3, -2, -1, 0, +1, +2, +3, …}
// Output: {…, 5, 3, 1, 0, 2, 4, 6, …}
func EncodeZigZag(x int64) uint64 {
@@ -530,6 +532,7 @@ func EncodeZigZag(x int64) uint64 {
}
// DecodeBool decodes a uint64 as a bool.
+//
// Input: { 0, 1, 2, …}
// Output: {false, true, true, …}
func DecodeBool(x uint64) bool {
@@ -537,6 +540,7 @@ func DecodeBool(x uint64) bool {
}
// EncodeBool encodes a bool as a uint64.
+//
// Input: {false, true}
// Output: { 0, 1}
func EncodeBool(x bool) uint64 {