# `NervesHubLink.MsgPackSerializer`
[🔗](https://github.com/nerves-hub/nerves_hub_link/blob/v2.14.0/lib/nerves_hub_link/msgpack_serializer.ex#L6)

A Msgpack based serializer for Phoenix Channels messages.

Msgpack encodes the same messages as the default JSON serializer in fewer
bytes, which is worth having on metered or low bandwidth connections. To use
it, add [`msgpax`](https://hex.pm/packages/msgpax) to your dependencies:

    def deps() do
      [
        {:msgpax, "~> 2.0"}
      ]
    end

and select it in your config:

    config :nerves_hub_link,
      serializer: :msgpack

Your NervesHub server must support Msgpack for this to work. If it doesn't,
the device will fail to connect.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
