• API reference
  • Blog
  • Changelog
  • Follow us on GitHubFollow us on XJoin our Discord server
  • API reference
  • Blog
  • GitHub
  • Releases
  • Getting started

    • Overview
  • Library

    • Getting started
    • Array
    • Result
    • Dependency injection
    • Resource management
    • Type
    • Task
    • Conventions
    • Testing
    • Assert
  • Local-first

    • Getting started
    • Playgrounds
    • Examples
    • Owners
    • Schema
    • Relay
    • Time travel
    • Indexes
    • Protocol
    • Privacy
    • FAQ
  • Other

    • Comparison
    • Showcase
    • Changelog

API reference › @evolu/common › local‑first/Protocol › encodeDbChange

function encodeDbChange(buffer: Buffer, message: CrdtMessage): void;

Defined in: packages/common/src/local-first/Protocol.ts:2368

Encodes a CrdtMessage as encodeAndEncryptDbChange does before padding and encryption.

Evolu.getMutationSize measures mutations with this encoding, so maxMutationSize limits exactly what is encoded, and every change within it fits one protocol message.

Markdown for LLMs

© 2026 Evolu

Follow us on GitHubFollow us on XJoin our Discord server