ZXLGF File Formats                                                  12-MAY-2012
===============================================================================

  zxlife saves and loads files in two file file formats:
    ZXLGF1  - Used to load and save grids (.zgf files)
    ZXLGF2  - Used for templates (.zgt files)
  The two formats are, however, interchangable. Using the ZXLGF2 format for
  .zgf files just ignores the description field. Using the ZXLGF1 format for
  templates means you cant supply a description.

  ZXLGF1:
    +------------+--------+--------+----------------...
    | ZXLGF1     | width  | height | grid bitmap
    +------------+--------+--------+----------------...
     6 bytes       4 bytes  4 bytes  width*height bits

    Offset  Size  Type       Name   Description
    0x00    6     ASCII      sig    "ZXLGF1"
    0x06    4     LE uint32  width  Width of the grid
    0x0A    4     LE uint32  height Height of the grid
    0x0E    *     bitmap     data   Grid data. Width * height bits.

  ZXLGF2:
    +------------+--------+------...----+--------+--------+----------------...
    | ZXLGF2     | dsc_len| description | width  | height | grid bitmap
    +------------+--------+------...----+--------+--------+----------------...
     6 bytes      4 bytes  dsc_len bytes 4 bytes  4 bytes  width*height bits


    Offset  Size  Type       Name    Description
    0x00    6     ASCII      sig     "ZXLGF1"
    0x06    4     LE uint32  dsc_len Length of the description field in bytes
    0x0A    *     text       desc    Description field. Length is dlen bytes.
    *       4     LE uint32  width   Width of the grid
    *       4     LE uint32  height  Height of the grid
    *       *     bitmap     data    Grid data. Width * height bits.

===============================================================================
                                                                  David Goodwin