|
Quoting Russell Haley <russ.haley@gmail.com>:
b:Segment() - I would think this would be 0 to the length of the buffer. I like the :next() and :shift() ideas, but that would mean the module would need internal state on what the size of the 'chuck' would be? Perhaps: cs = 256 s4 = b:Segment(128,cs):next(cs) or if state IS desired: b.def_chuck_size = 256 s4 = b:Segment(128):next()
State is not an issue, the instances are already stateful. I'm going ahead with Egors ideas :-) -Tobias