/**
 * @packageDocumentation
 * Node entry point. Synchronously reads, decompresses, and parses the
 * bundled `data/icao-registry.json.gz` snapshot at module load time, then
 * exposes the result as a single eager constant. Suitable for server-side
 * Node consumers.
 *
 * Browser and edge consumers should use the {@link "./browser"} entry point
 * instead, which performs the same work asynchronously via `fetch` and
 * `DecompressionStream`.
 */
import { readFileSync } from 'node:fs';
import { resolve, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { gunzipSync } from 'node:zlib';
const dataPath = resolve(dirname(fileURLToPath(import.meta.url)), '../data/icao-registry.json.gz');
const raw = JSON.parse(gunzipSync(readFileSync(dataPath)).toString('utf-8'));
/**
 * Pre-processed snapshot of US aircraft registrations derived from the
 * FAA ReleasableAircraft database.
 *
 * Contains registration, make, model, operator, aircraft type, engine type,
 * and year of manufacture for all US-registered aircraft with an assigned
 * ICAO hex address.
 *
 * Pass the `records` array directly to `createIcaoRegistry()` from
 * `@squawk/icao-registry` for zero-config lookups:
 *
 * ```typescript
 * import { usBundledRegistry } from '@squawk/icao-registry-data';
 * import { createIcaoRegistry } from '@squawk/icao-registry';
 *
 * const registry = createIcaoRegistry({ data: usBundledRegistry.records });
 * ```
 */
export const usBundledRegistry = {
    properties: raw.meta,
    records: raw.records,
};
