Module: C0::Stream

Defined in:
lib/c0/stream.rb

Overview

Stream mode: ETB-committed append logs (DESIGN.md "Stream Mode").

r = C0::Stream::Reader.new(File.binread("events.c0"))
r.torn?           # => data trails the last commit
r.each_record { |rec| ... }

Defined Under Namespace

Classes: DamagedBlockError, Reader

Class Method Summary collapse

Class Method Details

.last_commit_end(buf) ⇒ Object

Position just past the last commit, found by a backward scan: a shortcut for well-formed input (Reader is authoritative).



132
# File 'lib/c0/stream.rb', line 132

def self.last_commit_end(buf) = Ext.last_commit_end(C0.to_bin(buf))