Update restic/chunker to v0.1.0
This commit is contained in:
parent
e9d939ff2d
commit
27c5a2825a
2 changed files with 5 additions and 6 deletions
4
vendor/manifest
vendored
4
vendor/manifest
vendored
|
@ -58,8 +58,8 @@
|
||||||
{
|
{
|
||||||
"importpath": "github.com/restic/chunker",
|
"importpath": "github.com/restic/chunker",
|
||||||
"repository": "https://github.com/restic/chunker",
|
"repository": "https://github.com/restic/chunker",
|
||||||
"revision": "49e9b5212b022a1ab373faf981ed4f2fc807502a",
|
"revision": "bb2ecf9a98e35a0b336ffc23fc515fb6e7961577",
|
||||||
"branch": "master"
|
"branch": "HEAD"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"importpath": "github.com/spf13/cobra",
|
"importpath": "github.com/spf13/cobra",
|
||||||
|
|
|
@ -85,8 +85,7 @@ type Chunker struct {
|
||||||
chunkerState
|
chunkerState
|
||||||
}
|
}
|
||||||
|
|
||||||
// New returns a new Chunker based on polynomial p that reads from rd
|
// New returns a new Chunker based on polynomial p that reads from rd.
|
||||||
// with bufsize and pass all data to hash along the way.
|
|
||||||
func New(rd io.Reader, pol Pol) *Chunker {
|
func New(rd io.Reader, pol Pol) *Chunker {
|
||||||
c := &Chunker{
|
c := &Chunker{
|
||||||
chunkerState: chunkerState{
|
chunkerState: chunkerState{
|
||||||
|
@ -141,8 +140,8 @@ func (c *Chunker) reset() {
|
||||||
c.pre = c.MinSize - windowSize
|
c.pre = c.MinSize - windowSize
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate out_table and mod_table for optimization. Must be called only
|
// fillTables calculates out_table and mod_table for optimization. This
|
||||||
// once. This implementation uses a cache in the global variable cache.
|
// implementation uses a cache in the global variable cache.
|
||||||
func (c *Chunker) fillTables() {
|
func (c *Chunker) fillTables() {
|
||||||
// if polynomial hasn't been specified, do not compute anything for now
|
// if polynomial hasn't been specified, do not compute anything for now
|
||||||
if c.pol == 0 {
|
if c.pol == 0 {
|
||||||
|
|
Loading…
Reference in a new issue