API reference / @evolu/common / local-first/Protocol / decodeFlags
Function: decodeFlags()
function decodeFlags(buffer, count): readonly boolean[];
Defined in: packages/common/src/local-first/Protocol.ts:1703
Decodes a byte into an array of boolean flags.
Example
const flags = decodeFlags(buffer, 3); // Decode 3 flags
Parameters
| Parameter | Type |
|---|---|
buffer | Buffer |
count | number & Brand<"Int"> & Brand<"NonNegative"> & Brand<"Positive"> |
Returns
readonly boolean[]