Popularity
6.1
Declining
Activity
0.0
Stable
70
8
14
Monthly Downloads: 105
Programming language: Elixir
License: MIT License
Tags:
Protocols
Latest version: v0.2.0
message_pack alternatives and similar packages
Based on the "Protocols" category.
Alternatively, view message_pack alternatives based on common mentions on social networks and blogs.
-
msgpax
High-performance and comprehensive MessagePack implementation for Elixir / msgpack.org[Elixir] -
protox
A fast, easy to use and 100% conformant Elixir library for Google Protocol Buffers (aka protobuf) -
elixir-sippet
An Elixir library designed to be used as SIP protocol middleware.
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Promo
workos.com
Do you think we are missing an alternative of message_pack or a related project?
README
MessagePack for Elixir
Installation
Add :message_pack
as a dependency in your mix.exs
file.
defp deps do
[{:message_pack, "~> 0.2.0"}]
end
Usage
# pack
MessagePack.pack([1,2,3]) #=> { :ok, <<147,1,2,3>> }
MessagePack.pack!([1,2,3]) #=> <<147,1,2,3>>
# unpack
MessagePack.unpack(<<147,1,2,3>>) #=> { :ok, [1,2,3] }
MessagePack.unpack!(<<147,1,2,3>>) #=> [1,2,3]
# unpack_once
MessagePack.unpack_once(<<147,1,2,3,4>>) #=> {:ok, {[1, 2, 3], <<4>>}}
MessagePack.unpack_once!(<<147,1,2,3,4>>) #=> {[1, 2, 3], <<4>>}
Options
enable_string
Support string type. This options is false
by default.
iex(1)> { :ok, bin } = MessagePack.pack(<<255>>)
{:ok, <<161, 255>>}
iex(3)> MessagePack.unpack(<<161, 255>>)
{:ok, <<255>>}
iex(4)> MessagePack.unpack(<<161, 255>>, enable_string: true)
{:error, {:invalid_string, <<255>>}}
ext
Support extention type.
See test/message_pack_ext_test.exs
.
License
MIT
*Note that all licence references and agreements mentioned in the message_pack README section above
are relevant to that project's source code only.