Güralp Compressed Format
Stream ID : a unique 6-character label identifying the device, component and sample
rate:
1
2
3
4
5
6
Device serial number
Component
O/P tap
The 6-character label is encoded in 4 bytes as a base 36 number, in the same manner
as the
System ID
, above.
Date code :
The date and time when the data in the block begin, expressed as a 32-bit
number where
•
the bottom 17 bits are the time in seconds since midnight, normally between
0 and 86399 but possibly 86400 or 86401 in years with 'leap seconds'; and
•
the top 15 bits are the Güralp day number, with day zero on 17 November 1989.
The day number increments when the seconds number rolls over at
midnight.
Data format :
The final header element contains 4 bytes defining the format of the
data in the block:
1
2
3
4
reserved
Sample rate
Compression code Number of data
records
Sample rate :
The sample rate of the data records, an integer number of samples per
second. If this field is zero, the block body contains status information in ASCII text
format.
Compression code :
A code for the compression format used for all the data in the
block. Currently accepted values are:
1
Data records contain one 32-bit difference
2
Data records contain two 16-bit differences
4
Data records contain four 8-bit difference
Other values are reserved for future expansion.
Number of data records :
The number of 32-bit data records in the block. Combining
this with the compression code enables you to find out the total number of sample
points in the block; dividing by the sample rate allows the time duration of the block
to be determined. You should check for status blocks (which have
Sample rate
= 0)
before performing this calculation. For status blocks, the number of characters is
Number of data records
× 4.
The block duration is always a whole number of seconds, and always starts on a
whole second boundary. A data block has a maximum size of 1024 bytes. If the
115
Issue U - December, 2021