From: Stefan Nilsson Date: Mon, 5 Mar 2012 15:02:30 +0000 (-0500) Subject: encoding/binary: improve package comment. X-Git-Tag: weekly.2012-03-13~241 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a347fdb035898f6c3344e112416a3eb9d0fb9cff;p=gostls13.git 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 --- 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 (