FIT Parser - v6.2.7
    Preparing search index...

    Class FitParser

    Parse FIT inputs through the async or callback APIs.

    Index
    • Decodes the first FIT file with a synchronous callback. Success calls callback(undefined, data); file-validation failure calls callback(message, undefined).

      Parameters

      • content: ArrayBuffer | Buffer<ArrayBuffer>
      • callback: (error: string | undefined, data: ParsedFit | undefined) => void

      Returns void

      Decoder errors are thrown synchronously rather than passed to the callback. Handle both channels, or use parseAsync for promise-based handling.

    • Decodes the first FIT file in a Buffer or ArrayBuffer. Buffer views respect their byte offset and length. Pass decompressed FIT bytes.

      Parameters

      • content: ArrayBuffer | Buffer<ArrayBuffer>

      Returns Promise<ParsedFit>

      Profile-named fields and the collections selected by the options.

      The promise rejects with a string for file-validation failures, or an Error for decoder failures. Use parseFilesAsync for concatenated inputs.

    • Parses FIT files in input order with independent decoder state. Uses the same force and strict policies as parseAsync; strict mode rejects trailing bytes, while the default ignores a non-FIT suffix after parsed files. Rejects with an Error when any file cannot be parsed.

      Parameters

      • content: ArrayBuffer | Buffer<ArrayBuffer>

      Returns Promise<ParsedFit[]>

      One result per FIT file, in input order, without merging results.

      The promise rejects with an Error if any file fails. Partial results are not returned. Record byteOffset diagnostics include preceding files.