C0::Stream::Reader
Inherits Struct / Value / Object
Scans a buffer for ETB commit markers and exposes only the committed region. Zero-copy: all accessors return slices into the original buffer.
reader = C0::Stream::Reader.new(buf) reader.torn? # => true if an uncommitted tail trails reader.each_record { |rec| ... } # committed records only
Constructors
new(buf : Bytes)
SourceInstance methods
block(i : Int32) : Bytes
Committed block by index: the bytes between the previous commit and this block's ETB (marker and payload excluded).
buf
Sourcecommitted_end
Offset just past the last commit marker and its payload. Zero if the buffer contains no commits.
table
The committed region as a Table (handles an optional GS name and SOH header, then RS records).