Saucexages v0.2.0 Saucexages.Codec.Decoder View Source

Functions for decoding SAUCE records and SAUCE comment blocks.

Link to this section Summary

Functions

Decodes a SAUCE comments block given an expected number of comment lines according to a SAUCE record, and returns a list of comments

Decodes a SAUCE record binary

Decodes a full SAUCE block from a given SAUCE record and list of SAUCE comments

Link to this section Functions

Link to this function decode_comments(arg1, comment_lines) View Source
decode_comments(binary(), integer()) ::
  {:ok, [String.t()]} | {:error, :no_comments} | {:error, term()}

Decodes a SAUCE comments block given an expected number of comment lines according to a SAUCE record, and returns a list of comments.

Link to this function decode_record(sauce_record) View Source
decode_record(binary()) ::
  {:ok, Saucexages.SauceRecord.t()} | {:error, :no_sauce} | {:error, term()}

Decodes a SAUCE record binary.

Link to this function decode_sauce(sauce_record, sauce_comments) View Source
decode_sauce(Saucexages.SauceRecord.t(), [String.t()]) ::
  {:ok, Saucexages.SauceBlock.t()} | {:error, term()}

Decodes a full SAUCE block from a given SAUCE record and list of SAUCE comments.