/// /// import { ParquetSchema } from './schema'; /** * Options for creating a ParquetBufferWriter */ export interface ParquetBufferWriterOptions { rowGroupSize?: number; pageSize?: number; useDataPageV2?: boolean; } /** * Synchronous in-memory Parquet writer that accumulates rows and returns a Buffer. */ export declare class ParquetBufferWriter { private schema; private opts; private rowGroupSize; private pageSize; private rowCount; private rowBuffer; private rowGroups; private chunks; private offset; private headerWritten; private closed; constructor(schema: ParquetSchema, opts?: ParquetBufferWriterOptions); /** * Create a new ParquetBufferWriter and return it. */ static openBuffer(schema: ParquetSchema, opts?: ParquetBufferWriterOptions): ParquetBufferWriter; /** * Append a row to the buffer. */ appendRow(row: T): void; /** * Finalize and return the complete Parquet file as a Buffer. * Terminal operation: sets closed=true, throws if called twice. */ toBuffer(): Buffer; /** * Write a buffer section and update offset */ private writeSection; /** * Flush the current row group to chunks */ private flushRowGroup; } /** * Convenience function: write an array of rows to a Parquet buffer. * Equivalent to creating a ParquetBufferWriter, appending all rows, and calling toBuffer(). */ export declare function generateParquetBuffer(schema: ParquetSchema, rows: T[], opts?: ParquetBufferWriterOptions): Buffer;