Add Bin class with pack and unpack

Issue #6 resolved
Mark Penner repo owner created an issue

Write an improved pack/unpack with support for unsigned 64-bit longs.

Also add "backreferences" a la regexes so that you can do something like vlength/a\k<length>str which would match a little-endian short followed by a string of that length.

Or maybe an easy to read syntax, like short<length>/string[\k<length>]<string>. i.e. type<name>/type<name>(quantity)/type or an array

[
    'length' => 'short',
    'mystring' => 'string[20]',
    'ints(15)' => 'int'
]

Comments (5)

  1. Log in to comment