A lightweight, pure-Elixir miniSEED block reader.
Only the 48-byte fixed header of each record is decoded (to extract the
source identifier, start time, sample count / rate and the record length);
the raw sample bytes of each record are passed through untouched. This lets
callers fetch and order blocks by (source id, time) without decoding any
waveform data.
Time and record-length handling follows libmseed for SEED 2.x records:
- start time is binary (year/day as big-endian
uint16, then hour, minute, second and fractional-second byte(s)); - the record length comes from the Blockette 1000 length exponent
(
2^exponent), falling back to a default of 512 bytes.
Summary
Functions
Decode a 48-byte miniSEED fixed header.
Read all miniSEED blocks from path within the given byte range.
Determine the record length in bytes from a (whole or partial) record binary, reading the Blockette 1000 length exponent when present.
Build the source identifier in the canonical FDSN:NET_STA_LOC_CHAN form
Types
Functions
@spec parse_header(binary()) :: MSeed.Parser.Header.t() | {:error, :short_header}
Decode a 48-byte miniSEED fixed header.
Read all miniSEED blocks from path within the given byte range.
The caller (e.g. the inventory) is expected to have already resolved the request into concrete files and byte ranges, so no per-record filtering is performed here.
Options:
:start_offset- first byte to consider (default0):end_offset- last byte to consider (default end of file):record_length- use a known record length, skipping Blockette detection
Returns {:ok, [%MSeed.Parser{}]} on success.
Determine the record length in bytes from a (whole or partial) record binary, reading the Blockette 1000 length exponent when present.
Build the source identifier in the canonical FDSN:NET_STA_LOC_CHAN form