Skip to main content

Module buffer

Module buffer 

Source
Expand description

Buffering utilities for efficient I/O operations

Provides buffered readers and writers with configurable buffer sizes and chunking strategies optimized for different data patterns.

Structs§

ChunkStream
Stream processor for chunked data processing

Constants§

DEFAULT_BUFFER_SIZE
Default buffer size for I/O operations (64KB)
LARGE_BUFFER_SIZE
Large buffer size for high-throughput operations (1MB)
SMALL_BUFFER_SIZE
Small buffer size for memory-constrained scenarios (4KB)

Functions§

buffered_reader
Create a buffered reader with default buffer size
buffered_reader_with_capacity
Create a buffered reader with custom buffer size
buffered_writer
Create a buffered writer with default buffer size
buffered_writer_with_capacity
Create a buffered writer with custom buffer size
copy_buffered
Copy data from reader to writer with buffering
read_chunks
Read a file in chunks, applying a function to each chunk
write_chunks
Write data to a file in chunks