/**
 * Base Transform Stream
 *
 * Provides a base class for Transform streams.
 * Works identically in both browser and Node.js environments.
 */
import { EventEmitter } from "./event-emitter.js";
export interface BaseTransformOptions {
    /** High water mark for backpressure */
    highWaterMark?: number;
    /** Enable object mode (non-binary data) */
    objectMode?: boolean;
}
export type TransformCallback<T = Uint8Array> = (error?: Error | null, data?: T) => void;
/**
 * Browser-compatible Base Transform stream
 */
export declare abstract class BaseTransform<TInput = Uint8Array, TOutput = Uint8Array> extends EventEmitter {
    protected _buffer: TInput[];
    protected _bufferIndex: number;
    protected _isProcessing: boolean;
    protected _isDestroyed: boolean;
    protected _isFinished: boolean;
    protected _errorEmitted: boolean;
    protected _objectMode: boolean;
    protected _highWaterMark: number;
    private _ending;
    private _flushInProgress;
    constructor(options?: BaseTransformOptions);
    /**
     * Main transform implementation - must be overridden by subclasses
     */
    abstract processChunk(chunk: TInput, callback: TransformCallback<TOutput>): void;
    /**
     * Optional flush implementation for remaining data
     */
    processFlush(callback: TransformCallback<TOutput>): void;
    /**
     * Write data to the transform stream
     */
    write(chunk: TInput): boolean;
    /**
     * Signal end of input
     */
    end(chunk?: TInput): void;
    /**
     * Destroy the stream
     */
    destroy(error?: Error): void;
    /**
     * Process next chunk in buffer
     */
    private _processNext;
    private _maybeFlush;
    /**
     * Emit error only once
     */
    private _emitError;
    /**
     * Check if stream is in a valid state
     */
    get isValid(): boolean;
    /**
     * Check if stream has finished
     */
    get isFinished(): boolean;
    /**
     * Pipe to another transform or collector
     */
    pipe<T extends BaseTransform<TOutput, any>>(destination: T): T;
}
