Results for “chunks”
Small, practical examples. Search by task or narrow things down below.
Copy a file in bounded binary chunks
C: Check read, write, and close errors while copying without loading the entire file.
C✓ Tested
Iterate over bounded chunks
Iterate over bounded chunks using a complete Go program with explicit sample inputs.
Go✓ Tested
Process a slice in bounded chunks
Process a slice in bounded chunks in a complete Rust program using the standard library.
Rust✓ Tested
Read text in bounded chunks
Read a C text file with fgets and a fixed buffer.
C✓ Tested
Split values into fixed-size chunks
C#: Enumerable.Chunk creates arrays and allows a shorter final chunk.
C#✓ Tested
Split a list into fixed-size batches
Python: Slice a sequence at regular offsets; the final batch can be smaller.
Python✓ Tested
Split an array into bounded batches
JavaScript: Advance by a positive batch size and allow a shorter final chunk.
JavaScript✓ Tested
Split an array into bounded batches
TypeScript: Advance by a positive batch size and allow a shorter final chunk.
TypeScript✓ Tested
Split an array into fixed-size batches
PowerShell: Bound the final index so the last batch can contain fewer elements.
PowerShell✓ Tested
Hash a file without reading it all at once
Python: Feed fixed-size binary chunks into SHA-256 for files larger than memory.
Python✓ Tested