40 releases (16 breaking)
new 0.19.2 | Jul 24, 2024 |
---|---|
0.18.3 | Jul 2, 2024 |
0.16.0 | Mar 1, 2024 |
0.14.2 | Nov 18, 2023 |
0.4.0 | Mar 29, 2023 |
#237 in Encoding
12,242 downloads per month
Used in 2 crates
765KB
18K
SLoC
dbn
The official crate for working with Databento Binary Encoding (DBN). For more information about DBN, read our introduction to DBN.
Check out the databento crate for the official Databento Rust client.
Installation
To add the crate to an existing project, run the following command:
cargo add dbn
Usage
To read a DBN file with MBO data and print each row:
use dbn::{
decode::dbn::Decoder,
record::MboMsg,
};
use streaming_iterator::StreamingIterator;
let mut dbn_stream = Decoder::from_zstd_file("20201228.dbn.zst")?.decode_stream::<MboMsg>()?;
while let Some(mbo_msg) = dbn_stream.next() {
println!("{mbo_msg:?}");
}
Documentation
See the docs for more detailed usage.
License
Distributed under the Apache 2.0 License.
Dependencies
~6–9MB
~159K SLoC