View Source locus_mmdb_data_codec (locus v2.3.6)

API for working with MMDB - data codec

Link to this section Summary

Functions

Attempts to parse either the Value or RawValue (depending on the Raw flag) at Index in DataSection.

Link to this section Types

Specs

index() :: non_neg_integer().

Link to this section Functions

Link to this function

parse_on_index(Index, DataSection, Raw)

View Source

Specs

parse_on_index(Index, DataSection, Raw) -> {Value | RawValue, RemainingData}
                  when
                      Index :: index(),
                      DataSection :: binary(),
                      Raw :: boolean(),
                      Value :: locus_mmdb_data:value(),
                      RawValue :: locus_mmdb_data_raw:value(),
                      RemainingData :: binary().

Attempts to parse either the Value or RawValue (depending on the Raw flag) at Index in DataSection.

Will crash upon invalid/unrecognized data, invalid pointers or cyclic pointer chasing (i.e. loops.)