2.1.4 Record

A record is the basic building block that stores information about features in a chart. Each binary record is a variable-length sequence of bytes. A binary record consists of three components: a record type, a record size, and the record data specific to that record type.

The record type is a 2-byte unsigned integer that specifies what type of information is specified by the record and how the structure of the record data of this record is ordered and structured. Each valid record type is listed in Record Enumeration (section 2.3).

The record size is a 2-byte unsigned integer that specifies the count of bytes that specifies the total size of the record data.

The record data component contains fields that correspond to a record type and comprise the remainder of the record. The order and structure of the fields for a record type listed in Record Enumeration (section 2.3) are specified in the corresponding section for that record type in Records (section 2.4). The size of the record data component MUST be equal to the record size. Fields in the record data component can contain simple values, arrays of values, structures of several fields, arrays of fields, and arrays of structures.

If the total number of bytes to be written for a record data component is greater than 8224, a collection of Continue records, as specified in the ABNF for that record, contains the remaining record data. In general, the first 8224 bytes of data is contained in the record data component of the record, and the remaining data is divided into blocks of 8224 bytes and contained in the subsequent collection of Continue records, until all the data is written. See specific record definitions for exceptions.