This format can be parsed as follows. In this example, the schema is described using JSON for clarity, though in practise any array may be used. You can have php-binary parse a generic stream of bytes ...