Compression Support & New sigmf.fromarray method#146
Merged
Conversation
c0147fc to
05ac806
Compare
777arc
approved these changes
Apr 29, 2026
Collaborator
Author
|
I'm actually going to block my own PR here and slightly improve this before we merge it.
|
* fromarray() only creates SigMFFile object from numpy array, doesn't write files * SigMFFile.tofile() auto-detects archive/compression from extension * when data_buffer exists, will also write `.sigmf-data`, like when using (SigMFGenerator) * added more tests
sigmf.tofile methodsigmf.fromarray method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #26. Adds read/write support for compressed SigMF archives (
.sigmf.gz,.sigmf.xz,.sigmf.zip) using only stdlib so no new dependencies are needed. Compression usestarfilefor gzip/xz andzipfilefor zip.Also fixed performance issue where reading uncompressed
.sigmfarchives was extracting data to RAM — these are now numpy memmapped directly into the tar.Also added a
sigmf.fromarray()convenience function to mirrorsigmf.fromfile(). It infers the SigMF datatype from the numpy dtype. This can then be used with existing tofile() method: