|
@@ -337,8 +337,9 @@ class ChunkBuffer:
|
|
|
self.buffer.seek(0)
|
|
|
# The chunker returns a memoryview to its internal buffer,
|
|
|
# thus a copy is needed before resuming the chunker iterator.
|
|
|
- # note: this is the items metadata stream chunker, we only will get CH_DATA allocation here,
|
|
|
- # thus chunk.data will always be data bytes.
|
|
|
+ # note: this is the items metadata stream chunker, we only will get CH_DATA allocation here (because there are,
|
|
|
+ # no all-zero chunks in a metadata stream), thus chunk.data will always be bytes/memoryview and allocation
|
|
|
+ # is always CH_DATA and never CH_ALLOC/CH_HOLE).
|
|
|
chunks = list(bytes(chunk.data) for chunk in self.chunker.chunkify(self.buffer))
|
|
|
self.buffer.seek(0)
|
|
|
self.buffer.truncate(0)
|