Whiff.Report (whiff v0.1.0)

Copy Markdown View Source

Helpers for decoding and inspecting whiff/1 reports (string-keyed maps).

Summary

Functions

Append an extractor/analyzer diagnostic entry.

Decode JSON bytes from the NIF into a string-keyed map.

True when native extraction appears to have run a covering extractor for the identified format (not mere magic detection).

The schema identifier written to whiff.schema.

Stable top-level section names.

Functions

append_extractor_diag(report, entry)

@spec append_extractor_diag(map(), map()) :: map()

Append an extractor/analyzer diagnostic entry.

decode(json)

@spec decode(binary()) :: {:ok, map()} | {:error, Whiff.Error.t()}

Decode JSON bytes from the NIF into a string-keyed map.

native_covered?(report)

@spec native_covered?(map()) :: boolean()

True when native extraction appears to have run a covering extractor for the identified format (not mere magic detection).

Low-confidence heuristic text hits without extension_matches are not treated as covered — proprietary extensions often look like plain text to upstream, and Elixir :fallback Whiffers must still run for those.

schema_version()

@spec schema_version() :: String.t()

The schema identifier written to whiff.schema.

top_level_sections()

@spec top_level_sections() :: [String.t()]

Stable top-level section names.