Skip to content

Releases: Basekick-Labs/msgpack

v6.0.0

03 Mar 14:32

Choose a tag to compare

v6.0.0 — Basekick-Labs Fork

Highlights

Performance — 15 optimizations targeting the encode/decode hot paths:

  • MarshalAppend API for zero-alloc buffer reuse (-26% vs Marshal)
  • Zero-allocation byte-slice reader for Unmarshal (-21% decode, -50% memory)
  • map[string]string encode fast path (-15%)
  • Skip reflect.Convert for exact map/slice types (-7–8%)
  • Inline hasNilCode for byte-slice reader (-2–4% decode)
  • Replace goroutine-per-type value pool with sync.Pool (fixes goroutine leak)
  • Pool sorted map keys, rec buffers, OmitEmpty slice elimination

Bug Fixes — 12 fixes for correctness and safety:

  • OOM protection: cap slice/map allocations at 1M elements
  • Float-to-integer decode with NaN/Inf/overflow validation
  • Non-string map key support in interface{} decode
  • TextUnmarshaler wire format detection (str vs bin)
  • Unexported field handling in omitempty struct emptiness
  • Custom error type preservation, reflect.Value marshal, unaddressable interface decode

Module path: github.com/Basekick-Labs/msgpack/v6

Full details: CHANGELOG.md