/** * Splits a name in presentation form into its raw labels, the empty root label last for a name that ends with the root, which is the array the label coder * encodes. A backslash quotes the character after it, so "\." and "\\" give a literal dot and backslash and "\X" gives X. A name holding no backslash * takes the native split, so it costs what a plain split costs. * * @param name - The name in presentation form. * @throws When the name ends with an escaped dot, since such a name has no root label. */ export declare function splitLabels(name: string): string[]; /** * Splits a name in presentation form that carries no root label, a hostname or a domain as a caller writes it, into its raw labels. A backslash ending the * name, not itself escaped, quotes nothing and is dropped, so an odd run of trailing backslashes loses its last. The name then splits as the end of a name, * its root label added and dropped again, so a trailing escaped dot stays a literal dot in the last label and a trailing dot leaves an empty last label. No * backslash is left to quote the root label added, so the split never throws. * * @param name - The name in presentation form, without the root label. */ export declare function splitRelativeName(name: string): string[]; /** * Writes one raw label in presentation form, a backslash before each dot and each backslash. A label holding neither comes back unchanged. * * @param label - The raw label. */ export declare function escapeLabel(label: string): string; /** * The octets a name takes on the wire without compression, read from its raw labels: one length octet and the UTF-8 bytes of each label, and one octet for * the empty root label. It is the figure the label coder's uncompressed length computes for the same name. * * @param labels - The raw labels, as {@link splitLabels} returns them. */ export declare function wireLength(labels: string[]): number; //# sourceMappingURL=dns-labels.d.ts.map