# `rfcap`
Rust library to parse and read an [`rfcap`](https://k3xec.com/rfcap/) format file

## Example
### Parse the header
```rust
use rfcap::prelude::*;

let mut reader = File::open("../assets/10hz_1024sps_c64.rfcap").unwrap();
let capture: CaptureHeader = reader.read_ne().unwrap();
println!("{}", capture);
assert_eq!(capture.sample_format, SampleFormat::Complex64);
```

### Parse the whole file and read a single sample
```rust
use rfcap::prelude::*;

let reader = File::open("../assets/10hz_1024sps_c64.rfcap").unwrap();
let mut capture: Capture = Capture::from_reader(reader).unwrap();
let sample = capture.next_sample().unwrap().unwrap();
println!("{:?}", sample);
```

---
[MIT License](https://github.com/w1ltshire/furmint/blob/engine-overhaul/LICENSE)