Skip to main content

get_data_header

Function get_data_header 

Source
pub fn get_data_header(
    filename: &str,
    data_bytes: &[u8],
) -> Result<Header, SigmfError>
Expand description

Builds a tar header for a {filename}.sigmf-data member of data_bytes.len() bytes.

The header is a GNU tar header for a regular file with mode 0644, uid/gid 0, and mtime 0, so archives are reproducible.

ยงErrors

Returns SigmfError::Io if the member path cannot be stored in a tar header (for example, because it is too long).