export interface Alphabet { /** The dictionary's characters in index order, one entry per code point so emoji count as one. */ symbols: string[]; /** How many symbols stand for one byte. */ width: number; } /** A dictionary's characters with repeats dropped, since a repeated symbol could not be decoded. */ export declare function uniqueSymbols(chars: string): string; export declare function createAlphabet(chars: string): Alphabet; /** Writes the text's UTF-8 bytes in the dictionary's base, every byte as `width` symbols. */ export declare function encodeCipher(text: string, alphabet: Alphabet): string; /** Reads text written by `encodeCipher` back, throwing with what is wrong when it was not. */ export declare function decodeCipher(encoded: string, alphabet: Alphabet): string; //# sourceMappingURL=cipher.d.ts.map