Skip to main content

Module file

Module file 

Source
Expand description

Low-level tar helpers for .sigmf archives.

A SigMF archive is a tar file whose members are .sigmf-meta, .sigmf-data, and optionally .sigmf-collection files. These functions build deterministic tar headers for such members and locate members inside an existing archive. Most users should work with Archive instead.

Functions that look members up by name take the member path without its extension (including any directory prefix, for example "dir/rec") and the extension without a leading dot (for example "sigmf-meta"). When several members match, the first one in archive order is used.

Functionsยง

append_archive_member_from_name_ext
Copies the archive member {name}.{ext} from the tar file at archive_path into builder, preserving its original header.
get_bytes_in_archive_from_hash
Finds the .sigmf-meta member of the tar file at archive_path whose SHA-512 digest equals hash, returning its contents and tar header.
get_bytes_in_archive_from_name_ext
Reads the archive member {name}.{ext} from the tar file at archive_path, returning its contents and tar header.
get_collection_header
Builds a tar header for a {filename}.sigmf-collection member of collection_bytes.len() bytes.
get_data_header
Builds a tar header for a {filename}.sigmf-data member of data_bytes.len() bytes.
get_data_header_for_member
Builds a tar header for a dataset member stored at exactly member_path with a size of data_bytes.len() bytes.
get_meta_header
Builds a tar header for a {filename}.sigmf-meta member of meta_bytes.len() bytes.
get_size_in_archive_from_name_ext
Returns the size in bytes of the archive member {name}.{ext} in the tar file at archive_path, without reading its contents.
process_collection_file
Parses a .sigmf-collection tar entry and stores it in archive as the collection named name.
process_meta_file
Parses a .sigmf-meta tar entry and registers it in archive as a recording named file_name.