Saucexages v0.2.0 Saucexages.Codec.Encoder View Source
Functions for encoding SAUCE blocks as binary.
Link to this section Summary
Functions
Encodes a single comment block line. If the size of the line is longer than allowed, it will be truncated
Encodes an entire comment block. If the size of any line is longer than allowed, it will be truncated
Encodes a C-style string for SAUCE using CP437, padding as needed with zeros according to size
Encodes an elixir date time as a SAUCE date time binary in the format “CCMMYYDD”
Encodes a given SAUCE block field
Encodes an integer to a given size as an unsigned little integer. If the integer is larger than the size allows, it will wrap
Encodes a given SAUCE block as a SAUCE record binary
Encodes a string for SAUCE using CP437, padding as needed with spaces according to size
Encodes the SAUCE version
Link to this section Functions
Encodes a single comment block line. If the size of the line is longer than allowed, it will be truncated.
encode_comments(Saucexages.SauceBlock.t()) :: {:ok, binary()} | {:error, term()}
Encodes an entire comment block. If the size of any line is longer than allowed, it will be truncated.
encode_cstring(String.t(), pos_integer()) :: binary()
Encodes a C-style string for SAUCE using CP437, padding as needed with zeros according to size.
Encodes an elixir date time as a SAUCE date time binary in the format “CCMMYYDD”.
encode_field(Saucexages.Sauce.field_id(), Saucexages.SauceBlock.t()) :: term()
Encodes a given SAUCE block field.
encode_integer(non_neg_integer(), pos_integer()) :: binary()
Encodes an integer to a given size as an unsigned little integer. If the integer is larger than the size allows, it will wrap.
encode_record(Saucexages.SauceBlock.t()) :: {:ok, binary()}
Encodes a given SAUCE block as a SAUCE record binary.
encode_string(String.t(), pos_integer()) :: binary()
Encodes a string for SAUCE using CP437, padding as needed with spaces according to size.
Encodes the SAUCE version.