GCF Specification

Guralp Compressed Format (GCF)

All data blocks used by the GSL digital devices are in GCF format. This is a format for the efficient transmission of digitally sampled data streams where multiple sources may share a common transmission medium.

Each GCF block consists of two parts: a header and a body. For data blocks, this body contains first differences of the sample values, and for status blocks, the body contains text status information.

The header is 16 bytes long, split into four 4 byte fields which are:

The rest of the block contains the data fields.

* Note: Serial data transmission may reduce 32 bit differences to 3-bytes (24 bit). All data on disk, file or network will be full 32 bit differences. 24 bit values have a 16 million range (±8 million). The difference values must be able to indicate ±16 million, which is 25 bits. Since the compression may discard the 25th bit, the sign of a 24 bit difference must be determined during decompression. A simple method is to check whether the addition of the 24 bit difference would place the sample value outside the range of a 24 bit number. If this occurs, then the sign of the difference should be inverted.

See Also:

Decoding Base 36 numbers, Decoding Dates and Times, Block Transfer Protocol