ByteRangeReader

works.iterative.claude.core.log.ByteRangeReader

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def readFully(offset: Long, length: Int, readUpTo: (Long, Int) => Array[Byte]): Array[Byte]

Reads the bytes in [offset, offset + length) by repeating readUpTo until the range is filled or the file ends before it.

Reads the bytes in [offset, offset + length) by repeating readUpTo until the range is filled or the file ends before it.

readUpTo(o, n) reads up to n bytes starting at absolute offset o, returning fewer only at end of file or on an interrupted read, and an empty array to signal end of file. A single underlying read is contractually allowed to return fewer bytes than requested even mid-file, so concatenating successive reads is what actually yields the full range — satisfying the exact-range contract BackwardLineReader expects of its readBlock.

Attributes