UNPKG

beth-parser

Version:

Parser library for Bethesda's Creation Engine data files

31 lines (30 loc) 1.07 kB
/// <reference types="node" /> export declare type Dictionary = { [id: number]: string; }; /** * Node.js based strings file reader (high-level API for parser). */ export default class StringsReader { private strings; /** * Read strings from the given data buffer. * @param buffer Buffer with strings data. * @param padded Whether strings are stored with size padding. * @param encoding String encoding. */ readBuffer(buffer: Buffer, padded?: boolean, encoding?: string): Dictionary; /** * Read strings from the specified file. * @param filename File system path to a strings file. * @param encoding String encoding. */ readFile(filename: string, encoding?: string): Dictionary; /** * Read strings for the specified modfile. * @param filename File system path to a modfile. * @param language Strings file language code. * @param encoding String encoding. */ readByModfile(filename: string, language: string, encoding?: string): Dictionary; }