TennyZhuang opened a new pull request, #6672:
URL: https://github.com/apache/opendal/pull/6672

   # Which issue does this PR close?
   
   Closes #6520.
   
   # Rationale for this change
   
   Splitting `Buffer` values into fixed-size chunks currently requires copying 
into `Vec<u8>` or `Bytes`. Adding a chunk iterator exposes an ergonomic, 
zero-copy approach to splitting contiguous and non-contiguous buffers, matching 
the use cases raised in #6520.
   
   # What changes are included in this PR?
   
   - Introduce `BufferChunks` plus a `Buffer::chunks` helper that yield 
sub-buffers sharing the underlying storage.
   - Implement iterator traits (`ExactSizeIterator`, `FusedIterator`) with 
accurate size hints for predictable iteration.
   - Add unit tests covering contiguous, non-contiguous, and zero-size chunk 
scenarios.
   
   # Are there any user-facing changes?
   
   New optional API `Buffer::chunks`; existing behavior is unchanged.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to