Saucexages v0.2.0 Saucexages.Codec.SauceFieldDecoder View Source
Functions for decoding commonly used SAUCE field data types.
Link to this section Summary
Functions
Converts a SAUCE string, optionally using the specified encodings
Decodes a SAUCE comment block comment line
Decodes SAUCE comment block comment lines as a list of strings
Decodes SAUCE comment block comment lines with an optional separator
Decodes SAUCE record comment lines
Decodes a SAUCE C-style string, removing any padding. A default value may be optionally specified to use for cases when decoding is impossible. Custom encodings can also be passed to attempt to decode using something other than the SAUCE standard CP437 and a fallback of utf-8
Decodes a SAUCE data type, using the SAUCE spec data type specification rules. If a data type is invalid, it will be coerced to 0
Decodes a SAUCE date binary to an Elixir DateTime
if possible
Decodes SAUCE date-time components taken from a SAUCE record and converts them to an Elixir DateTime
if possible
Decodes a SAUCE file type, using the SAUCE spec file type specification rules. If a file type is invalid, it will be coerced to 0
Decodes a SAUCE string, removing any padding. A default value may be optionally specified to use for cases when decoding is impossible. Custom encodings can also be passed to attempt to decode using something other than the SAUCE standard CP437 and a fallback of utf-8
Link to this section Functions
Converts a SAUCE string, optionally using the specified encodings.
Decodes a SAUCE comment block comment line.
Decodes SAUCE comment block comment lines as a list of strings.
Decodes SAUCE comment block comment lines with an optional separator.
decode_comment_lines(non_neg_integer() | binary()) :: non_neg_integer()
Decodes SAUCE record comment lines.
Decodes a SAUCE C-style string, removing any padding. A default value may be optionally specified to use for cases when decoding is impossible. Custom encodings can also be passed to attempt to decode using something other than the SAUCE standard CP437 and a fallback of utf-8.
decode_data_type(non_neg_integer()) :: non_neg_integer()
Decodes a SAUCE data type, using the SAUCE spec data type specification rules. If a data type is invalid, it will be coerced to 0.
decode_date(binary()) :: DateTime.t() | nil
Decodes a SAUCE date binary to an Elixir DateTime
if possible.
decode_date(binary(), binary(), binary()) :: DateTime.t() | nil
Decodes SAUCE date-time components taken from a SAUCE record and converts them to an Elixir DateTime
if possible.
decode_file_type(non_neg_integer(), non_neg_integer()) :: non_neg_integer()
Decodes a SAUCE file type, using the SAUCE spec file type specification rules. If a file type is invalid, it will be coerced to 0.
Decodes a SAUCE string, removing any padding. A default value may be optionally specified to use for cases when decoding is impossible. Custom encodings can also be passed to attempt to decode using something other than the SAUCE standard CP437 and a fallback of utf-8.