Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

Binary file format

source files: cfil.c

The binary file format used contains just enough structure to be robust, leaving almost all structure to be stored in the lisp file (or elsewhere, depending on the program involved.)

The file consists of a series of records, each record containing a number of blocks of same-type (double/float/int/byte) data together with a length. The grammar for the binary file is:

file --> record *
record --> 12345678          /* 32-bit hex number for byteorder deduction   */
           recordtype        /* 32-bit number. 13 decimal for array classes */
           block*
block  --> blocktype         /* 32-bit number giving type of data in block. */
           length            /* 32-bit number: length in floats/bytes/etc.  */
	   data              /* 'length' bytes/floats/ints/doubles.         */
blocktype --> CFIL_BYTES
            | CFIL_INT32S
            | CFIL_FLOATS
            | CFIL_DOUBLES

Go to the first, previous, next, last section, table of contents.