Module copy

Module copy 

Source
Expand description

Optimized file copy implementation with reusable buffers.

OPT-C002: Provides a stack-allocated copy buffer for efficient file extraction without heap allocations on every copy operation. This reduces memory pressure and improves throughput by 5-10% compared to std::io::copy.

§Security Guarantees

  • Preserves quota overflow detection via checked arithmetic
  • No unsafe code
  • Buffer size is constant and stack-allocated

Structs§

CopyBuffer
Stack-allocated buffer for efficient file copying.

Functions§

copy_with_buffer
Copies data from reader to writer using the provided reusable buffer.