Elixir implementation of BaseHangul, the human-readable binary encoding.
The original PHP implementation can be found here.
mix.exs:
def application do
[applications: [ ... , :basehangul]]
end
defp deps do
[ ... ,
{:basehangul, "~> 0.9.0"},
... ]
endBaseHangul.encode/1 and BaseHangul.decode/1 expect a binary
as an argument.
iex> BaseHangul.encode("Hello, world!")
"낏뗐맸굉깖둠덱뮴닥땡결흐"
iex> BaseHangul.encode(<<0, 1, 2, 3, 4>>)
"가갚궁링"iex> BaseHangul.decode("낏뗐맸굉깖둠덱뮴닥땡결흐")
"Hello, world!"
iex> BaseHangul.decode("가갚궁링")
<<0, 1, 2, 3, 4>>Have fun!
WTFPL
- Massive refactoring and overhaul.
- Removed functions taking an IO device.
- Now the decoder raises an
ArgumentErrorwhen invalid BaseHangul string is provided as an input.
- Added more encoder/decoder wrappers for the convenience.
- Added library documentation.
Initial development release. basehangul is now available on Hex.
Initial commit.