This file format was created for my custom, fast, safe, web-centric #SPI Flasher.

Data can be translated to/from JSON and raw, with mixed support for block addresses. Other formats must be translated with other software.

The file format is best described by the self-documenting file example.hyx:

; the above line is the "magic signature" for the HYX data format.
; it must be placed at the very beginning of the file or stream.
; HYX1 is the same as HYX0 but with repeat enabled (with the dot character)

; comments start with a ';' and span the remaining characters of the line.
; you can put digits there : 0123456789ABCDEFabcdef

; empty lines are ok

; :0123   ; address specifiers are supported for non-binary outputs.
; The address is in hexa too.

01 23 45 67 89 Ab cD Ef ; data are represented in bytes,
 ; they must come as pairs of hexadecimal digits.
 ; the case is not meaningful.
 ; they can be separated by other characters,
 ; or even glued together, but a space is recommended and safest.


ABCDEF  ; note : this is NOT a big endian representation

00..... ; 0 is repeated 5 times (plus the first one)

; 20140907 : An optional end-of-file marker is possible with HYX1:

After the end of file we can write anything here.
The parser is very easy to write.

It is provided as an #include .c file : input_hyx.c
You must provide some callbacks for the input and output of bytes.
Look at hyx2bin.c for an example of .hyx import.

TODO: support .gz compression... see

Data integrity is not part of the format. Data alterations are rare and if you need to ensure integrity, other powerful tools exist, even GZIP has built-in CRC.