/**
 * Binary codec for route data compression
 *
 * Encodes GlobalRoutes to compact binary format using:
 * - Variable byte encoding (varint) for numeric compression (2-4x smaller)
 * - 16-bit integer IDs for airports instead of strings
 * - Deduplicated string table for carrier codes
 *
 * Binary layout (after header):
 *   1. String table — deduplicated carrier IATA codes
 *   2. IATA table  — 3-byte airport codes for all indexed airports
 *   3. Offset table — 4-byte offsets into the route data section per airport
 *   4. Route data  — per-airport connections using airport IDs
 *
 * This reduces the size from 13MB to ~4MB (~70% reduction)
 */
import type { GlobalRoutes } from "./schema";
export declare class BinaryCodec {
    private airportIndex;
    private airportList;
    private stringTable;
    private stringIndex;
    constructor();
    /**
     * Encode routes to compact binary ArrayBuffer
     *
     * Layout:
     *   [header(5)][string table][iata table(3*N)][offset table(4*N)][route data...]
     *
     *   header: version(1) + airportCount(2) + stringTableSize(2)
     *   string table: each entry = len(1) + chars...  (no null terminator)
     *   iata table: each entry = 3 ASCII chars (padded with space)
     *   offset table: each entry = uint32 offset into route data section
     *   route data: per airport = routeCount(varint) + [destId(2) km(varint) min(varint) carrierCount(1) [carrierId(1)]...]...
     */
    encode(routes: GlobalRoutes): ArrayBuffer;
    /**
     * Decode binary back to routes
     */
    decode(buffer: ArrayBuffer): GlobalRoutes;
    private toRad;
    /**
     * Calculate varint length for a number
     */
    private varIntLength;
}
//# sourceMappingURL=codec.d.ts.map