jstewmc/chunker
Multi-byte safe chunked reading for huge files or strings in PHP. Avoids breaking UTF-8 characters by adjusting chunk boundaries so each chunk is valid text, reducing memory use while processing streams sequentially.
€ → ?).Use this when:
Storage::disk()->readStream()).Look elsewhere if:
fread()).SplFileObject for seekable streams).file_get_contents()).For Executives:
"This package solves a hidden technical debt risk: corrupted multi-byte characters in large files (e.g., € → ?) when chunking for memory efficiency. It’s a drop-in fix for Laravel apps handling uploads, logs, or exports—reducing memory usage while preserving data integrity. Low risk (MIT license, 7 stars), high ROI for global apps or high-volume data pipelines."
For Engineers: *"A battle-tested, multi-byte-safe chunker for PHP 7.4+. Key benefits:
? artifacts.file_get_contents() with while ($chunk = $chunker->current()).composer require and use in 10 minutes."*How can I help you explore Laravel packages today?