Bsdf
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
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 2.1.0.0 | fixed typo in description. |
