All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- BREAKING: Map encoding is now deterministic by default
Msgpack.encode/2sorts map keys according to Elixir's standard term ordering before serialization- This guarantees that identical maps produce identical binary output, but it alters the output compared to previous versions of this library
- Added a
:deterministicoption toMsgpack.encode/2- You can set this to
falseto disable key sorting for higher performance in contexts where deterministic output is not required.
- You can set this to
- Added the
Msgpack.Encodableprotocol to allow for custom serialization logic for any Elixir struct- This allows users to encode their own data types, such as %Product{} or %User{}, directly
- Fixed broken links in documentation
- Added a new Streaming API that processes data in chunks, reducing peak memory
usage when handling large datasets or network streams
- Introduced
Msgpack.encode_stream/2to lazily encode a stream of Elixir terms one by one - Introduced
Msgpack.decode_stream/2to lazily decode a stream of MessagePack objects, capable of handling data that arrives in multiple chunks
- Introduced
- Added CI workflow to run tests against supported Elixir versions
- Updated minimum supported Elixir version to v1.12
- While the library may work with older versions, StreamData supports a minimum of v1.12, so it would be missing the property tests
- Updated timestamp decoding to be backwards-compatible with Elixir v1.12
- Add missing
guides/directory to list of published docs in package config
- Added a dedicated how-to guide for using telemetry
- Exception messages were expanded to include specific details about the cause of the error and, where applicable, configuration options for resolution.
- Updated all documentation (@moduledoc, @doc, readme, etc.)
- Initial release
- Support for all MessagePack types, including
Integer,Float,String,Binary,Array,Map,Ext, and theTimestampextension- Encoding for the full 64-bit unsigned integer range
- Native encoding and decoding for Elixir's
DateTimeandNaiveDateTimestructs - Protection against maliciously crafted decoding inputs via
:max_depthand:max_byte_sizeoptions - Added a
:string_validationoption toencode/2to bypass UTF-8 validation for performance gains - Emits
:telemetryevents for all encode and decode operations - Includes
encode!/2anddecode!/2for raising exceptions on errors