import { type ParsedOptions } from '../options.utils.js'; /** * Stream information returned from the server. */ export type Stream = { /** Stream ID */ id: number; /** Stream name */ name: string; /** Number of topics in the stream */ topicsCount: number; /** Total size of the stream in bytes */ sizeBytes: bigint; /** Total number of messages in the stream */ messagesCount: bigint; /** Stream creation timestamp */ createdAt: Date; /** Options the client explicitly sent at create */ options: ParsedOptions; }; /** * Result of deserializing a stream. */ type StreamDeserialized = { /** Number of bytes consumed */ bytesRead: number; /** Deserialized stream data */ data: Stream; }; /** * Deserializes a stream from a buffer. * * @param r - Buffer containing serialized stream data * @param pos - Starting position in the buffer * @returns Object with bytes read and deserialized stream data * @throws Error if the buffer is empty (stream does not exist) */ export declare const deserializeToStream: (r: Buffer, pos?: number) => StreamDeserialized; export {}; //# sourceMappingURL=stream.utils.d.ts.map