DATRW++ library: seismic data I/O with multiple formats
|
Header fields of input formats, which cannot be represented in SFF structs can be written of the trace FREE block. The writing modules can be equipped with a mechanism to extract these values from the FREE block and to write them to the appropriate header fields. In such a case the text field should be removed from the FREE block before writing to file, to avoid accumulation of such header fields in the FREE block due to reading the written file again.
Currently the library uses stream function read and write for binary output in modules like the Reading module for: mini-SEED data. These functions apparently are remainders of a pre-standard implementation of streams (prior to the invention of stream buffers). The GNU libstdc++ documentations recommends to do binary I/O on the stream-buffer level, since streams themselves are not meant to do binary I/O. Nevertheless binary I/O appears to work with the read and write functions of streams. However, these functions operate on values of type char
. This could mean that the would still do some kind of character translation, which we do not like when reading binary seismic data. The stream buffer operations are also defined for character data. I currently cannot find sufficient documentation to understand whether there is a risk of input or output data being translated with input streams opened in binary mode.