nvflare.fuel.utils.buffer_list module
- class BufferList(buf_list: list)[source]
Bases:
objectA buffer list that can be treated as a single buffer
- discard_before(offset: int) None[source]
Release complete buffers ending at or before an absolute offset.
- read_bytes(start: int, end: int) bytes[source]
Read a range into one immutable bytes allocation.
Unlike
read(), this method does not first assemble a multi-buffer range into a bytearray. This matters for large streamed FOBS sections: callers that require bytes would otherwise copy the complete range once into a bytearray and a second time into bytes.