Reading without a cursor
Karu treats every read as a complete request containing an object, byte position, length, destination buffer, and caller tag. Because the position travels with the request, reads can run independently without sharing a moving cursor. Before data moves, Karu resolves each window to its real byte position, rejects invalid ranges, and groups reads from the same object so the engine can build an efficient transfer plan.
Combining nearby ranges
Nearby ranges can share one larger transfer when that costs less than separate network trips. Strict limits on gaps, transfer size, pieces, and extra bytes keep this optimization from fetching too much data.
Local and remote reads
Local files use direct positional reads. Remote objects use HTTP requests for exact byte ranges. Karu keeps several transfers active, so one slow response does not stop the rest of the batch. The engine tracks queued work, active transfers, retries, and completed results while reusing network connections and TLS sessions. Credentials are resolved separately, without blocking bytes already in motion.
Checking every result
Karu accepts a result only when its returned range and byte count match the request. It retries temporary failures with bounded delays, then separates merged data into the original buffers and caller tags.