# \[ANN\] data-encoding.0.5 release

**URL:** <https://discuss.ocaml.org/t/ann-data-encoding-0-5-release/9420>\
**Category:** Community\
**Tags:** announce\
**Created:** [February 26, 2022, 10:36am UTC](https://discuss.ocaml.org/t/ann-data-encoding-0-5-release/9420 "2022-02-26T10:36:18Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![raphael-proust](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/raphael-proust/32/415_2.png) [@raphael-proust](https://discuss.ocaml.org/u/raphael-proust)\
**Post date:** [February 26, 2022, 10:36am UTC](https://discuss.ocaml.org/t/ann-data-encoding-0-5-release/9420/1 "2022-02-26T10:36:18Z")

</div>

On behalf of [Nomadic Labs](https://www.nomadic-labs.com/), I’m happy to announce the release of data-encoding version 0.5.

This new version brings several bug fixes, some increased test coverage, minor improvements in the API, and a major new feature:

## Compact encodings: sub-byte tag sizes

This new version provides a new set of combinators for _compact_ encodings. These compact encodings will handle all the verbose and error-prone bit-twidling process needed to combine multiple sub-byte discriminators into a single byte-size one.

E.g., the encoding `let e1 = either (either bool unit) (option bool)` uses three bits in the shared tag and zero bytes after that;  
the encoding `let e2 = either int32 int64` uses one bit in the shared tag and either 4 or 8 bytes to represent the integer;  
the product encoding `let ee = tup2 e1 e2` uses four (3 + 1) bits in the shared tag and either 4 or 8 bytes to represent the integer of `e2`.

## How to get

The code is available under MIT license on [Nomadic Labs / data-encoding · GitLab](https://gitlab.com/nomadic-labs/data-encoding).

It can be installed via `opam`.

---

_[View the full topic](https://discuss.ocaml.org/t/ann-data-encoding-0-5-release/9420)._
