/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * The Korean road-name address register (주소DB) as the LABEL source: a streaming reader over the monthly zip * `fetchJusoKR` downloads (#2204 §1). * * The archive holds four pipe-delimited CP949 text files per 시도 plus one nationwide road-code file, laid out as the * guide inside the zip states (붙임1, the 전체분 layout): * * 개선_도로명코드_전체분.txt 도로명코드|도로명|도로명로마자|읍면동일련번호|시도명|…|읍면동구분|… * 주소_<시도>.txt 관리번호|도로명코드|읍면동일련번호|지하여부|건물본번|건물부번|기초구역번호|… * 지번_<시도>.txt 관리번호|일련번호|법정동코드|시도명|시군구명|법정읍면동명|법정리명|산여부|… * 부가정보_<시도>.txt 관리번호|행정동코드|행정동명|우편번호|…|건축물대장건물명|시군구건물명|공동주택여부 * * A LABEL row is one 주소 record joined to its road code (the admin ladder and the road name), its representative lot * (대표여부 = 1: the 법정동, the 리, and the lot number the 지번 form writes) and its supplement (the postcode — the * 기초구역번호 on the 주소 row IS the five-digit postcode — and the building name). The row-count note in the zip * gives 6,424,089 addresses and 8,194,643 lots for the 2026-08-31 edition. * * MEMBER NAMES ARE CP949 WITHOUT THE UTF-8 FLAG, so a zip reader that trusts the format's CP437 default finds * `┴╓╝╥_╝¡┐ïÆ╣▌╗π.txt` and matches nothing; `filenameEncoding` decodes the central directory's real bytes. The * contents need the same treatment one layer down, which is what `decodeByteStream` does before the line split. */ import type { PathBuilderLike } from "path-ts"; /** * The 2026 edition writes the merged 전남광주통합특별시 where every older source — the permit registry, Who's On First — still * writes 전라남도 and 광주광역시. A typed string in either form aligns against the register through this map. */ export declare const REGION_ALIASES: Readonly>; /** * One address of the register, with the pieces the road form and the lot form each write. */ export interface JusoLabelRow { region: string; sigungu: string; /** * The 읍/면 the road address itself carries between the 시군구 and the road (읍면동구분 `0`), else empty: a 동 is never written * in the road form, it goes in the parenthetical. */ eupmyeon: string; dong: string; ri: string; road: string; number: string; postcode: string; building: string; lot: string; underground: boolean; } /** * What the official form writes in parentheses after the number: the 법정동 in a 동 area, the 리 in an 읍/면. */ export declare function parenthetical(row: JusoLabelRow): string; /** * Every full-edition member of one kind, as `[region suffix, archive name]`, sorted by region. * * The monthly edition also ships 변동 (change-only) files under the same prefixes; those carry a different row set and * are excluded by name. */ export declare function regionMembers(names: readonly string[], prefix: string): Array<[string, string]>; export interface ReadJusoOptions { /** * Stop after this many rows per 시도. For a fixture or a smoke run; omit for the whole register. */ maxRowsPerRegion?: number; } /** * Stream every LABEL row, region by region. * * The lot and supplement files of one 시도 are held while its address file streams, so the join never holds the country * at once — the largest region's two side files, not 6.4 million addresses. */ export declare function readJusoLabelRows(archivePath: PathBuilderLike, options?: ReadJusoOptions): AsyncGenerator; //# sourceMappingURL=label-rows.d.ts.map