@platformatic/kafka
Version:
Modern and performant client for Apache Kafka
12 lines (11 loc) • 547 B
JavaScript
export const INT8_SIZE = 1;
export const INT16_SIZE = 2;
export const INT32_SIZE = 4;
export const INT64_SIZE = 8;
export const UUID_SIZE = 16;
export const EMPTY_BUFFER = Buffer.alloc(0);
export const EMPTY_UUID = Buffer.alloc(UUID_SIZE);
// Since it is serialized at either 0 (for nullable) or 1 (since length is stored as length + 1), it always uses a single byte
export const EMPTY_OR_SINGLE_COMPACT_LENGTH_SIZE = INT8_SIZE;
// TODO(ShogunPanda): Tagged fields are not supported yet
export const EMPTY_TAGGED_FIELDS_BUFFER = Buffer.from([0]);