elixir_bencode alternatives and similar packages
Based on the "Text and Numbers" category.
Alternatively, view elixir_bencode alternatives based on common mentions on social networks and blogs.
-
money
Elixir library for working with Money safer, easier, and fun... Is an interpretation of the Fowler's Money pattern in fun.prog. -
nanoid
Elixir port of NanoID, a secure and URL-friendly unique ID generator. https://hex.pm/packages/nanoid -
exmoji
:sunglasses: Emoji encoding swiss army knife for Elixir/Erlang -
secure_random
Convenience library for random base64 strings modeled after my love for Ruby's SecureRandom -
chinese_translation
An elixir module to translate simplified Chinese to traditional Chinese, and vice versa, based on wikipedia data -
veritaserum
Sentiment analysis based on afinn-165, emojis and some enhancements. -
abacus
Parses and evaluates mathematical expressions in Elixir. Inspired by math.js -
monetized
A lightweight solution for handling and storing money. -
inet_cidr
CIDR library for Elixir that is compatible with Erlang's :inet and supports both IPv4 and IPv6 -
haikunator
Generate Heroku-like memorable random names to use in your apps or anywhere else. -
Ex_Cldr_Units
Unit formatting (volume, area, length, ...) functions for the Common Locale Data Repository (CLDR) -
expr
An Elixir library for parsing and evaluating mathematical expressions -
mt940
MT940 (standard structured SWIFT Customer Statement message) parser for Elixir. -
custom_base
Allow you to make custom base conversion in Elixir. -
convertat
An Elixir library for converting from and to arbitrary bases.
Access the most powerful time series database as a service
Do you think we are missing an alternative of elixir_bencode or a related project?
README
Elixir Bencode
Bencode decoder / encoder using Elixir data structures.
Documentation for Elixir Bencode is available online
Installation
Add it to to your mix.exs
dependencies:
defp deps do
[{:elixir_bencode, "~> 1.0.0"}]
end
Examples
## Encode strings (with thrown exceptions)
Bencode.encode!("hello world")
"11:hello world"
## Encode integers
Bencode.encode!(42)
"i42e"
## Encode lists
Bencode.encode!([1,2,3])
"li1ei2ei3ee"
## Encode maps
Bencode.encode!(%{"a" => 1, 2 => "b"})
#"di2e1:b1:ai1ee"
## Encode Dicts
Bencode.encode!(HashDict.new |> Dict.put :hello, :world)
"d5:hello5:worlde"
## Encode bitstrings
Bencode.encode!(<<1,2,3,4>>)
<<52, 58, 1, 2, 3, 4>>
## Encode without exceptions
Bencode.encode(2.0)
{:error, :invalid_format}
## Decode strings (with thrown expcetions)
Bencode.decode!("5:hello")
"hello"
## Decode integers
Bencode.decode!("i42e")
42
## Decode lists
Bencode.decode!("li1ei2ei3ee")
[1, 2, 3]
## Decode maps
Bencode.decode!("d5:hello5:worlde")
%{"hello" => "world"}
## Decode without exceptions
Bencode.decode("4:spam")
{:ok, "spam"}
Copyright
Copyright (c) 2014 Anton Fagerberg. See [LICENSE](LICENSE) for further details
*Note that all licence references and agreements mentioned in the elixir_bencode README section above
are relevant to that project's source code only.