# `Emerge.Engine.Serialization`
[🔗](https://github.com/emerge-elixir/emerge/blob/v0.2.1/lib/emerge/engine/serialization.ex#L1)

Binary serialization for Emerge.Engine.Element trees.

# `decode`

```elixir
@spec decode(binary()) :: Emerge.Engine.Element.t()
```

Decode a binary payload into a tree.

# `encode`

```elixir
@spec encode(Emerge.Engine.Element.t()) :: {binary(), Emerge.Engine.Element.t()}
```

Assign ids and encode a tree into a binary payload.

# `encode_tree`

```elixir
@spec encode_tree(Emerge.Engine.Element.t()) :: binary()
```

Encode a tree that already has numeric ids assigned.

---

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