Expand description
biodream — zero-copy, streaming-capable toolkit for reading and writing
BIOPAC AcqKnowledge (.acq) files across all known format versions (v30–v84+).
§Quick start
ⓘ
// Read a file in one call
let df = biodream::read_file("recording.acq")?.into_value();
println!("{}", df.summary());
// Lazy: parse headers without loading sample data
let lazy = biodream::open_file("recording.acq")?;
println!("{} channels", lazy.channel_count());
let ecg = lazy.load_channel(0)?;
// Filter to specific channels
let df = biodream::ReadOptions::new()
.channels(&[0, 2])
.scaled(true)
.read_file("recording.acq")?
.into_value();§Feature flags
| Feature | Default | Description |
|---|---|---|
std | via read | Standard library support |
read | yes | Read .acq files from disk or streams |
write | no | Write .acq files (requires read) |
csv | yes | CSV export |
arrow | no | Apache Arrow IPC export |
parquet | no | Parquet export (requires arrow) |
hdf5 | no | HDF5 export (requires libhdf5-dev) |
serde | no | Serde derive for domain types |
physio | no | Physiological signal processing (R-peaks, PPG feet, PTT, Sync detection) |
§no_std
The core library (domain + error modules) is no_std compatible with
alloc. I/O adapters and export targets require the std feature (enabled
transitively by read).
Re-exports§
pub use domain::ByteOrder;pub use domain::Channel;pub use domain::ChannelData;pub use domain::ChannelMetadata;pub use domain::Datafile;pub use domain::FileRevision;pub use domain::GraphMetadata;pub use domain::Journal;pub use domain::Marker;pub use domain::MarkerStyle;pub use domain::Timestamp;pub use error::BiopacError;pub use error::ParseResult;pub use error::Warning;pub use api::LazyDatafile;pub use api::ReadOptions;pub use export::csv::to_csv;pub use export::csv::CsvOptions;pub use export::csv::TimeFormat;pub use export::arrow::to_arrow_ipc;pub use export::parquet::to_parquet;pub use export::parquet::ParquetOptions;pub use export::hdf5::to_hdf5;pub use export::hdf5::Hdf5Options;pub use api::inspect::inspect_file;pub use api::inspect::inspect_bytes;pub use api::inspect::InspectReport;pub use api::inspect::ChannelInspect;pub use writer::write_file;pub use writer::write_stream;pub use writer::WriteOptions;
Modules§
- api
- High-level ergonomic API:
ReadOptionsandLazyDatafile. Ergonomic public API surface. - domain
- Pure domain types for biodream.
- error
- Typed error hierarchy for biodream.
- export
- Export targets for biodream recordings.
- parser
- Binary parser for .acq files. Requires the
readfeature for I/O. Binary parser for BIOPAC AcqKnowledge (.acq) files. - signals
- Physiological signal processing: R-peak detection, PPG foot detection, PTT. Physiological signal processing utilities for BIOPAC recordings.
- writer
- Write support for
.acqfiles (requireswritefeature).
Functions§
- open_
file - Open a
.acqfile for lazy channel access. - read_
bytes - Parse a
.acqfile from an in-memory byte slice. - read_
file - Read a
.acqfile from the filesystem. - read_
stream - Read a
.acqfile from anystd::io::Read+std::io::Seeksource.