View Source bencode (erl_bencode v1.1.1)
Summary
Functions
Takes a bencode string and convert it to a erlang term. Even Erlang specific terms is supported such as atoms and tuples. If
Value is an atom() it's considerd to be a file path. If Value is a list() it's considerd to be a bencode stringEncodes the
Value provided to bencodeFunctions
-spec decode(Value) -> {ok, Decoded} | {error, Reason} | {warning, Reason, Decoded} when Value :: list() | atom(), Decoded :: map() | list() | string() | integer() | atom(), Reason :: atom().
Value is an atom() it's considerd to be a file path. If 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() | string() | integer() | tuple() | atom(), Encoded :: list(), Reason :: atom().
Value provided to bencode