/**
 * Timeline Binning + Counter RLE (Spark Plan 05)
 *
 * Two compressors on a shared contract:
 *  - binTimelineSamples: uniform fixed-width binning of (ts, value) pairs
 *    using a configurable aggregation (Spark #23 token compression).
 *  - encodeCounterRle: turn a counter trail into run-length encoded
 *    segments that capture each turning point exactly once
 *    (Spark #27 — counter RLE / turning-point compression).
 *
 * Both functions return a TimelineBinningContract sharing trackId, range
 * and originalSampleCount so callers can reason about the compression
 * ratio uniformly regardless of which encoder ran.
 */
import { type NsTimeRange, type TimelineBinAggregation, type TimelineBinningContract } from '../types/sparkContracts';
export interface TimelineSample {
    ts: number;
    value: number;
}
export interface BinTimelineSamplesOptions {
    trackId: string | number;
    samples: TimelineSample[];
    range: NsTimeRange;
    binDurNs: number;
    aggregation?: TimelineBinAggregation;
}
/**
 * Uniform-width binning. Samples outside `range` are dropped.
 * Empty bins ARE included (with rowCount=0) so downstream consumers can
 * detect coverage gaps without needing to recompute the time axis.
 */
export declare function binTimelineSamples(options: BinTimelineSamplesOptions): TimelineBinningContract;
export interface EncodeCounterRleOptions {
    trackId: string | number;
    samples: TimelineSample[];
    range: NsTimeRange;
}
/**
 * Run-length encode a counter trail. Adjacent samples with the same value
 * collapse into a single segment, and the segment delta is the change from
 * the prior segment so consumers can render turning-point arrows.
 */
export declare function encodeCounterRle(options: EncodeCounterRleOptions): TimelineBinningContract;
//# sourceMappingURL=timelineBinning.d.ts.map