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.