func getRandomData(seed int, size int) ([]byte, []*chunker.Chunk) { buf := Random(seed, size) chunks := []*chunker.Chunk{} chunker := chunker.New(bytes.NewReader(buf), testPol, sha256.New()) for { c, err := chunker.Next() if err == io.EOF { break } chunks = append(chunks, c) } return buf, chunks }
func getRandomData(seed int, size int) []chunker.Chunk { buf := Random(seed, size) var chunks []chunker.Chunk chunker := chunker.New(bytes.NewReader(buf), testPol) for { c, err := chunker.Next(nil) if err == io.EOF { break } chunks = append(chunks, c) } return chunks }