]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/binary: improve package comment.
authorStefan Nilsson <snilsson@nada.kth.se>
Mon, 5 Mar 2012 15:02:30 +0000 (10:02 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 5 Mar 2012 15:02:30 +0000 (10:02 -0500)
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

src/pkg/encoding/binary/binary.go

index 02f090d53f31c68c346a7633c4b64f6fe71c9739..712e490e6563088d1d3b03bc0f97032d88e394e6 100644 (file)
@@ -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 (