Güralp Compressed Format
compression algorithm changes the compression format, blocks may appear which
are not filled to the maximum capacity.
The rest of the block contains the data fields.
8.1.2 The GCF body
The body of a GCF block contains
•
the absolute value of the first sample, a 32-bit signed integer referred to as the
Forward Integrating Constant or FIC (this is not a data record, and is not
counted in the Number of data records);
•
a series of differences between following samples—32-bit, 16-bit or 8-bit
signed integers according to the Compression code;
•
the absolute value of the last sample, a 32-bit signed integer, referred to as the
Reverse Integrating Constant or RIC. The RIC can be used as a checksum, as it
should match the last decompressed sample value. It is not a sample in itself.
Because the value of the first sample is used as the FIC, the data record immediately
after it is always zero.
Note:
When data from a 24-bit digitiser is compressed into GCF blocks
and the digitiser selects compression code 1 (32-bit data records) and the
block is being transmitted over a serial link, the digitiser may truncate the
32 bit differences to 24 bits by omitting the top byte of each difference.
This does not apply to true 32-bit data, even for blocks where the
differences would fit into 24 bits.
This optimization is made purely to use the serial link more efficiently, and is not
part of the GCF file format. When such data are stored on a disk or transmitted over a
network using TCP or UDP, they must be expanded back to the full 32 bits.
Because 24-bit values have a range of 16 million (±8 million), differences between
them must be able to indicate ±16 million, which is 25 bits. However, the serial
compression code discards the 25th bit. When decompressing the data, you will
need to reconstitute this bit.
You can check that you have correctly reconstituted the sign bits by comparing the
value you obtain at the end of the GCF block with the RIC.
8.2 Sending GCF streams over a network
GCF blocks can be embedded in TCP or UDP packets for transmission over a network
to other Güralp instruments or computers running GCF-compatible software such as
Scream!.
116
Issue U - December, 2021