ExIcaoVds.Capacity (ex_icao_vds v0.3.2)

Copy Markdown

Carrier capacity estimation and runtime preflight checks.

Default ceiling is 1558 bytes (Data Matrix ECC200), matching the default carrier used at issuance. Override with :max_carrier_bytes in opts.

Summary

Functions

Estimate worst-case payload size for a profile without actual document data.

Preflight check using actual encoded feature sizes from a completed encoding pass.

Functions

estimate(profile_config, opts \\ [])

@spec estimate(
  map(),
  keyword()
) :: ExIcaoVds.CapacityEstimate.t()

Estimate worst-case payload size for a profile without actual document data.

Uses max_length of each field to compute an upper bound. Intended for CI and design-time validation.

preflight(features, opts \\ [])

Preflight check using actual encoded feature sizes from a completed encoding pass.

Call after Generic.encode_all_features/2 and before signing to confirm the payload fits in the configured carrier.