1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-11 02:13:49 +09:00

make chunk size public

This commit is contained in:
Sergey Cherepanov 2023-03-21 18:28:45 +01:00
parent f34bc4061b
commit fa24020ab1
No known key found for this signature in database
GPG key ID: 87F8EDE8FBDF637C

View file

@ -23,7 +23,7 @@ const CName = "common.commonfile.fileservice"
var log = logger.NewNamed(CName)
const (
chunkSize = 1 << 20
ChunkSize = 1 << 20
)
func New() FileService {
@ -78,7 +78,7 @@ func (fs *fileService) AddFile(ctx context.Context, r io.Reader) (ipld.Node, err
Maxlinks: helpers.DefaultLinksPerBlock,
CidBuilder: &fs.prefix,
}
dbh, err := dbp.New(chunker.NewSizeSplitter(r, chunkSize))
dbh, err := dbp.New(chunker.NewSizeSplitter(r, ChunkSize))
if err != nil {
return nil, err
}