Yeah, that's what I was figuring.  I assumed that packing would
prepend rather than append, but I suppose that's configurable.

Hal Fulton <hal9000 / hypermetrics.com> wrote in message news:<40CD21FA.1080104 / hypermetrics.com>...
> Bill Atkins wrote:
> > Rather than having code like this:
> > 
> > flags, ignore, length, name = data.unpack "nnna*"
> > 
> > let's try this:
> > 
> > u = Unpacker.new data
> > flags, ignore, length, name = u.word, u.word, u.word, u.string
> > 
> > I think this looks a lot neater and is much more maintainable.  A
> > similar thing could be done with pack.
> > 
> > p = Packer.new
> > p.word 0x01
> > p.word 0x00
> > p.word 0x08
> > p.string "ERERER"
> > 
> > p.to_s => packed version
> > 
> > Any ideas on this before I draft it up into a real RCR?
> 
> Hmm, looks like it is keeping some internal state? A "file
> pointer" so to speak?
> 
> 
> Hal