import type { ISeekableWriter } from "./ISeekableWriter.ts"; import type { IWritable } from "./IWritable.ts"; import type { Schema, Channel, Message, Header, Attachment, Metadata, Statistics, IReadable } from "./types.ts"; export type McapWriterOptions = { writable: IWritable; useStatistics?: boolean; useSummaryOffsets?: boolean; useChunks?: boolean; repeatSchemas?: boolean; repeatChannels?: boolean; useAttachmentIndex?: boolean; useMetadataIndex?: boolean; useMessageIndex?: boolean; useChunkIndex?: boolean; startChannelId?: number; chunkSize?: number; compressChunk?: (chunkData: Uint8Array) => { compression: string; compressedData: Uint8Array; }; }; /** * McapWriter provides an interface for writing messages to MCAP files. * * NOTE: callers must wait on any method call to complete before calling another * method. Calling a method before another has completed will result in a corrupt * MCAP file. */ export declare class McapWriter { #private; statistics: Statistics | undefined; constructor(options: McapWriterOptions); /** * Initializes a new McapWriter for appending to an existing MCAP file. The same `readWrite` will * be used to load indexes out of the existing file, remove the DataEnd and subsequent records, * and then rewrite them when the writer is closed. The existing file must be indexed, since * existing indexes, channel and schema IDs, etc. are reused when appending to the file. * * A writer initialized with this method is already "opened" and does not require a `start()` * call, however it does require an eventual call to `end()` to produce a properly indexed MCAP * file. */ static InitializeForAppending(readWrite: IReadable & ISeekableWriter, options: Omit): Promise; start(header: Header): Promise; end(): Promise; /** * Add a schema and return a generated schema id. The schema id is used when adding channels. */ registerSchema(info: Omit): Promise; /** * Add a channel and return a generated channel id. The channel id is used when adding messages. */ registerChannel(info: Omit): Promise; addMessage(message: Message): Promise; addAttachment(attachment: Attachment): Promise; addMetadata(metadata: Metadata): Promise; } //# sourceMappingURL=McapWriter.d.ts.map