View Source bencode (erl_bencode v1.0.1)
Link to this section Summary
Link to this section Functions
-spec decode(Value) -> {ok, Decoded} | {error, Reason} | {warning, Reason, Decoded}
when Value :: list() | atom(), Decoded :: map() | list() | integer(), Reason :: atom().
Decodes Value
to a valid erlang term().
If Value
is an atom() it's considerd to be a file path.
Value
is a list() it's considerd to be a bencode string
-spec encode(Value) -> {ok, Encoded} | {error, Reason} | {warning, Reason, Encoded}
when Value :: map() | list() | integer(), Encoded :: list(), Reason :: atom().
Value
to Bencode.