rollsum

package module
v0.0.0-...-39e98d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2015 License: MIT Imports: 0 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

rollsum

Rollsum

type Rollsum struct {	
}

Count()

func (rs *Rollsum) Count() uint64

return Rollsum length

S1()

func (rs *Rollsum) S1() uint64

value of rollsum s1.

S2()

func (rs *Rollsum) S2() uint64

value of rollsum s2.

Update()

 func (rs *Rollsum) Update(p []byte)

checksum bytes p.

Init()

func (rs *Rollsum) Init()

initialize rollsum.

Rotate()

func (rs *Rollsum) Rotate(out, in byte)

rotate rollsum. remove out, sum in.

Rollin()

func (rs *Rollsum) Rollin(c byte)

add byte c checksum.

Rollout()

func (rs *Rollsum) Rollout(c byte)

remove byte c's checksum.

Digest()

func (rs *Rollsum) Digest() uint32

return Rollsum digest.

Documentation

Index

Constants

View Source
const (
	ROLLSUM_CHAR_OFFSET uint64 = 31
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Rollsum

type Rollsum struct {
	// contains filtered or unexported fields
}

the Rollsum struct type

func (*Rollsum) Count

func (rs *Rollsum) Count() uint64

func (*Rollsum) Digest

func (rs *Rollsum) Digest() uint32

func (*Rollsum) Init

func (rs *Rollsum) Init()

func (*Rollsum) Rollin

func (rs *Rollsum) Rollin(c byte)

func (*Rollsum) Rollout

func (rs *Rollsum) Rollout(c byte)

func (*Rollsum) Rotate

func (rs *Rollsum) Rotate(out, in byte)

golang: byte is an alias for uint8 and is equivalent to uint8 in all ways.

It is used, by convention, to distinguish byte values from 8-bit
unsigned integer values.

func (*Rollsum) S1

func (rs *Rollsum) S1() uint64

func (*Rollsum) S2

func (rs *Rollsum) S2() uint64

func (*Rollsum) Update

func (rs *Rollsum) Update(p []byte)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址