- Combined size and NUL byte checks into a single-pass `validate_files` function.
- Implemented early size check using `p.stat().st_size` to avoid reading oversized files.
- Replaced `p.read_bytes()` with memory-efficient chunked binary reading (64KB chunks).
- Reduced redundant list traversals and syscalls.
- Improved CI reliability by minimizing memory pressure during validation.