ExDataSketch.Backend.Pure (ExDataSketch v0.7.1)

Copy Markdown View Source

Pure Elixir backend for ExDataSketch.

This module implements the ExDataSketch.Backend behaviour using only Elixir/Erlang standard library functions. It is always available and serves as the default backend.

Implementation Notes

  • All state is stored as Elixir binaries with documented layouts.
  • Operations are pure: input binary in, new binary out. No side effects.
  • Batch operations (update_many) decode the register/counter array to a tuple for O(1) access, fold over all items, then re-encode once to minimize binary copying.