aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/encoding/binary
diff options
context:
space:
mode:
authorStefan Nilsson <snilsson@nada.kth.se>2012-03-05 10:02:30 -0500
committerRuss Cox <rsc@golang.org>2012-03-05 10:02:30 -0500
commita347fdb035898f6c3344e112416a3eb9d0fb9cff (patch)
tree4908b7fd10a0d2988edd0b2dff66bb26f7ebd379 /src/pkg/encoding/binary
parent06e18ca5a3ecca411e4b31d3bdc9f36356ed99c2 (diff)
downloadgo-a347fdb035898f6c3344e112416a3eb9d0fb9cff.tar.xz
encoding/binary: improve package comment.
The current package comment doesn't mention varints and protocol buffers. Also, the first sentence is incomprehensible without further context as "fixed-size values" is undefined. R=rsc CC=golang-dev https://golang.org/cl/5715048
Diffstat (limited to 'src/pkg/encoding/binary')
-rw-r--r--src/pkg/encoding/binary/binary.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/pkg/encoding/binary/binary.go b/src/pkg/encoding/binary/binary.go
index 02f090d53f..712e490e65 100644
--- a/src/pkg/encoding/binary/binary.go
+++ b/src/pkg/encoding/binary/binary.go
@@ -2,12 +2,17 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package binary implements translation between
-// unsigned integer values and byte sequences
-// and the reading and writing of fixed-size values.
+// Package binary implements translation between numbers and byte sequences
+// and encoding and decoding of varints.
+//
+// Numbers are translated by reading and writing fixed-size values.
// A fixed-size value is either a fixed-size arithmetic
// type (int8, uint8, int16, float32, complex64, ...)
// or an array or struct containing only fixed-size values.
+//
+// Varints are a method of encoding integers using one or more bytes;
+// numbers with smaller absolute value take a smaller number of bytes.
+// For a specification, see http://code.google.com/apis/protocolbuffers/docs/encoding.html.
package binary
import (