Bsdf

Matlab/Octave implementation of the Binary Structured Data Format (BSDF)
31 Downloads
Updated 21 Dec 2017

View License

BSDF is a binary format for serializing structured (scientific) data.
See http://bsdf.io for more information.
BSDF is implemented in various other languages, including Python
and JavaScript. This makes BSDF well-suited to move data accross
languages.

This is a well tested, but relatively minimal implementation: it does
not (yet) support custom extensions, and (zlib) compression is only
supported in Matlab (not Octave).

Usage:

bsdf = Bsdf()
bsdf.save(filename, data) % to save data to file
data = bsdf.load(filename) % to load data from file
blob = bsdf.encode(data) % to serialize data to bytes (a uint8 array)
data = bsdf.decode(blob) % to load data from bytes

Options (for writing) are provided as object properties:

- compression: the compression for binary blobs, 0 for raw, 1 for zlib
(not available in Octave).
- float64: whether to export floats as 64 bit (default) or 32 bit.
- use_checksum: whether to write checksums for binary blobs, not yet
implemented.

Cite As

Almar Klein (2026). Bsdf (https://www.mathworks.com/matlabcentral/fileexchange/65479-bsdf), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
2.1.0.0

fixed typo in description.