Missing the len of crc32 when calculating maxLen in WriteChunks (#494)
Signed-off-by: naivewong <867245430@qq.com>
This commit is contained in:
parent
a360aa3e86
commit
bff5aa4d21
|
@ -205,6 +205,7 @@ func (w *Writer) WriteChunks(chks ...Meta) error {
|
|||
for _, c := range chks {
|
||||
maxLen += binary.MaxVarintLen32 + 1 // The number of bytes in the chunk and its encoding.
|
||||
maxLen += int64(len(c.Chunk.Bytes()))
|
||||
maxLen += 4 // The 4 bytes of crc32
|
||||
}
|
||||
newsz := w.n + maxLen
|
||||
|
||||
|
|
Loading…
Reference in New Issue