UNPKG

kafka-ts

Version:

**KafkaTS** is a Apache Kafka client library for Node.js. It provides both a low-level API for communicating directly with the Apache Kafka cluster and high-level APIs for publishing and subscribing to Kafka topics.

31 lines (30 loc) 1.04 kB
export declare class Decoder { private buffer; private offset; constructor(buffer: Buffer); getOffset(): number; getBufferLength(): number; canReadBytes(bytes: number): boolean; readInt8(): number; readInt16(): number; readInt32(): number; readUInt32(): number; readInt64(): bigint; readUVarInt(): number; readVarInt(): number; readUVarLong(): bigint; readVarLong(): bigint; readString(): string | null; readCompactString(): string | null; readVarIntString(): string | null; readUUID(): string; readBoolean(): boolean; readArray<T>(callback: (opts: Decoder) => T): T[]; readCompactArray<T>(callback: (opts: Decoder) => T): T[]; readVarIntArray<T>(callback: (opts: Decoder) => T): T[]; readRecords<T>(callback: (opts: Decoder) => T): T[]; read(length?: number): Buffer<ArrayBufferLike>; readBytes(): Buffer<ArrayBufferLike> | null; readCompactBytes(): Buffer<ArrayBufferLike> | null; readTagBuffer(): Record<number, Buffer>; }