fitparse

Crates.iofitparse
lib.rsfitparse
version0.1.0
sourcesrc
created_at2020-07-14 11:59:25.758205
updated_at2020-07-14 11:59:25.758205
descriptionRust library for parsing files in Garmin FIT format
homepage
repositoryhttps://github.com/djk121/fitparse
max_upload_size
id265026
size2,504,309
(djk121)

documentation

README

Fitparse

Fitparse is a Rust library which implements a parser for Garmin's FIT file format.

Example

use fitparse::fitfile::FitFile;

let mut f = match File::open("/path/to/fit_file.fit").unwrap(); 

let mut fit_file = FitFile::new(
    1024 * 1024 * 10, // maximum file size, here 10 Mb
    true              // retain the raw bytes for per-message inspection
);

match ff.parse(&mut f) {
    Err(e) => panic!("failed to parse file: {:?}", e),
    _ => (),
}

println!("Parsed num messages: {}", ff.messages.len());

println!("Message #42:");
println!("{}", ff.messages[42]);
Commit count: 87

cargo fmt