Parse bi5 files.
Rust
use bi5::*;
let ticks = read_bi5("test/test.bi5").expect("Read failed");
assert_eq!(
ticks.first(),
Some(&Tick { millisecs: 1860002, ask: 133153, bid: 133117, askvol: 0.015, bidvol: 0.02 })
);
The catbi5
utility dumps a bi5
file to stdout.
```markdown
Usage: catbi5 [OPTIONS]
Arguments:
Options:
-d, --date
When no date is provided the output shows the milliseconds. Otherwise the proper datetime is calculated and shown.
A bi5 file is a lzma encoded sequence of ticks, where each tick is encoded as follows:
| Field | Format | Description | | --------- | ------ | ------------------------------ | | millisecs | u32 | Milliseconds since epoch start | | ask | u32 | Ask price | | bid | u32 | Bid price | | askvol | f32 | Ask volume | | bidvol | f32 | Bid volume |
All fields are big-endian encoded.