diff options
Diffstat (limited to 'devdocs/go/hash%2Fadler32%2Findex.html')
| -rw-r--r-- | devdocs/go/hash%2Fadler32%2Findex.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/devdocs/go/hash%2Fadler32%2Findex.html b/devdocs/go/hash%2Fadler32%2Findex.html new file mode 100644 index 00000000..58786cdd --- /dev/null +++ b/devdocs/go/hash%2Fadler32%2Findex.html @@ -0,0 +1,23 @@ +<h1> Package adler32 </h1> <ul id="short-nav"> +<li><code>import "hash/adler32"</code></li> +<li><a href="#pkg-overview" class="overviewLink">Overview</a></li> +<li><a href="#pkg-index" class="indexLink">Index</a></li> +</ul> <h2 id="pkg-overview">Overview </h2> <p>Package adler32 implements the Adler-32 checksum. </p> +<p>It is defined in RFC 1950: </p> +<pre data-language="go">Adler-32 is composed of two sums accumulated per byte: s1 is +the sum of all bytes, s2 is the sum of all s1 values. Both sums +are done modulo 65521. s1 is initialized to 1, s2 to zero. The +Adler-32 checksum is stored as s2*65536 + s1 in most- +significant-byte first (network) order. +</pre> <h2 id="pkg-index">Index </h2> <ul id="manual-nav"> +<li><a href="#pkg-constants">Constants</a></li> +<li><a href="#Checksum">func Checksum(data []byte) uint32</a></li> +<li><a href="#New">func New() hash.Hash32</a></li> +</ul> <h3>Package files</h3> <p> <span>adler32.go</span> </p> <h2 id="pkg-constants">Constants</h2> <p>The size of an Adler-32 checksum in bytes. </p> +<pre data-language="go">const Size = 4</pre> <h2 id="Checksum">func <span>Checksum</span> </h2> <pre data-language="go">func Checksum(data []byte) uint32</pre> <p>Checksum returns the Adler-32 checksum of data. </p> +<h2 id="New">func <span>New</span> </h2> <pre data-language="go">func New() hash.Hash32</pre> <p>New returns a new hash.Hash32 computing the Adler-32 checksum. Its Sum method will lay the value out in big-endian byte order. The returned Hash32 also implements <span>encoding.BinaryMarshaler</span> and <span>encoding.BinaryUnmarshaler</span> to marshal and unmarshal the internal state of the hash. </p><div class="_attribution"> + <p class="_attribution-p"> + © Google, Inc.<br>Licensed under the Creative Commons Attribution License 3.0.<br> + <a href="http://golang.org/pkg/hash/adler32/" class="_attribution-link">http://golang.org/pkg/hash/adler32/</a> + </p> +</div> |
