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 atarchive_pathintobuilder, preserving its original header. - get_
bytes_ in_ archive_ from_ hash - Finds the
.sigmf-metamember of the tar file atarchive_pathwhose SHA-512 digest equalshash, returning its contents and tar header. - get_
bytes_ in_ archive_ from_ name_ ext - Reads the archive member
{name}.{ext}from the tar file atarchive_path, returning its contents and tar header. - get_
collection_ header - Builds a tar header for a
{filename}.sigmf-collectionmember ofcollection_bytes.len()bytes. - get_
data_ header - Builds a tar header for a
{filename}.sigmf-datamember ofdata_bytes.len()bytes. - get_
data_ header_ for_ member - Builds a tar header for a dataset member stored at exactly
member_pathwith a size ofdata_bytes.len()bytes. - get_
meta_ header - Builds a tar header for a
{filename}.sigmf-metamember ofmeta_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 atarchive_path, without reading its contents. - process_
collection_ file - Parses a
.sigmf-collectiontar entry and stores it inarchiveas the collection namedname. - process_
meta_ file - Parses a
.sigmf-metatar entry and registers it inarchiveas a recording namedfile_name.