First version of generator/parser for binary format