Class | SuffixArrayDelta::DeltaReader |
In: |
lib/sadelta.rb
|
Parent: | Object |
Simply reads in a delta from the a data source (IO like) and then sends the events to an emitter. One limitation of the DeltaReader is that the String#unpack function does not allow an efficient streaming input. This means it has to use fixed size records instead of smaller variable sized records. For example, if I used BER encoded integers (with a pack argument of "cww" or "cw" for MATCH and INSERT) then I could save quite a lot of space. But, when I’d try to read this in I’d have no idea how much of the input stream is required to reconstruct a BER integer.
I plan to write a "streamable" pack/unpack library that will get around this problem, or create a tighter custom format. For now the format is pretty good and has the advantage possibly being faster.