Fitparser.Decoder (fitparser v0.5.0)

Copy Markdown

Pure Elixir decoder for Garmin FIT files.

Decoded records are grouped by FIT message name. Known messages use atom keys; unknown messages use "message_<global_number>". See load_fit/2 for the supported options.

Summary

Functions

Decodes FIT bytes. Alias for load_fit/2.

Decodes FIT bytes, raising on error. Alias for load_fit!/2.

Decodes the FIT file at path.

Decodes the FIT file at path, raising on error.

Decodes FIT bytes.

Decodes FIT bytes, raising on error.

Functions

decode(data, opts \\ [])

Decodes FIT bytes. Alias for load_fit/2.

decode!(data, opts \\ [])

Decodes FIT bytes, raising on error. Alias for load_fit!/2.

from_fit(path, opts \\ [])

Decodes the FIT file at path.

from_fit!(path, opts \\ [])

Decodes the FIT file at path, raising on error.

load_fit(data, opts \\ [])

Decodes FIT bytes.

Options:

  • :expand_components — expands component fields; defaults to false.
  • :standard_units — converts semicircles and FIT booleans; defaults to false.
  • :validate_crc — validates FIT header and data CRCs; defaults to false.
  • :include_metadata — adds FIT structural records; defaults to false.
  • :processors — record processors applied after decoding; defaults to [].

load_fit!(data, opts \\ [])

Decodes FIT bytes, raising on error.