mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 06:46:34 +00:00
chunker: Further cleanup
This commit is contained in:
parent
ea22b2dfb1
commit
f79e530e18
@ -18,8 +18,6 @@ import (
|
|||||||
var benchArchiveDirectory = flag.String("test.benchdir", ".", "benchmark archiving a real directory (default: .)")
|
var benchArchiveDirectory = flag.String("test.benchdir", ".", "benchmark archiving a real directory (default: .)")
|
||||||
var testPol = chunker.Pol(0x3DA3358B4DC173)
|
var testPol = chunker.Pol(0x3DA3358B4DC173)
|
||||||
|
|
||||||
const chunkerBufSize = 512 * chunker.KiB
|
|
||||||
|
|
||||||
type Rdr interface {
|
type Rdr interface {
|
||||||
io.ReadSeeker
|
io.ReadSeeker
|
||||||
io.ReaderAt
|
io.ReaderAt
|
||||||
|
@ -86,8 +86,7 @@ type Chunker struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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, using buf for
|
// with bufsize and pass all data to hash along the way.
|
||||||
// buffering.
|
|
||||||
func New(rd io.Reader, pol Pol, h hash.Hash) *Chunker {
|
func New(rd io.Reader, pol Pol, h hash.Hash) *Chunker {
|
||||||
c := &Chunker{
|
c := &Chunker{
|
||||||
buf: bufPool.Get().([]byte),
|
buf: bufPool.Get().([]byte),
|
||||||
|
Loading…
Reference in New Issue
Block a user