import type { FeatureIterator, Reader } from './index.js';
export * from './tile/file.js';
export * from './osm/file.js';
/**
 * # File Reader
 *
 * ## Description
 * Reads data from a file implementing the {@link Reader} interface
 *
 * ## Usage
 * ```ts
 * import { FileReader } from 'gis-tools-ts/file-ts';
 *
 * const reader = new FileReader('./BETA2007.gsb');
 *
 * const data = await reader.getRange(0, 100);
 * ```
 */
export declare class FileReader implements Reader {
    #private;
    private cursor;
    byteOffset: number;
    byteLength: number;
    textDecoder: TextDecoder;
    /** @param file - The path to the file */
    constructor(file: string);
    /**
     * @returns - the current position of the cursor
     */
    tell(): number;
    /**
     * Set the current position of the cursor
     * @param pos - where to adjust the current cursor
     */
    seek(pos?: number): void;
    /**
     * Reads a 64-bit unsigned integer (biguint64) at the given byteOffset
     * @param byteOffset - The position in the file to read from
     * @param littleEndian - Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
     * @returns The 64-bit unsigned integer as a bigint
     */
    getBigInt64(byteOffset?: number, littleEndian?: boolean): bigint;
    /**
     * Reads a 64-bit unsigned integer (biguint64) at the given byteOffset
     * @param byteOffset - The position in the file to read from
     * @param littleEndian - Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
     * @returns The 64-bit unsigned integer as a bigint
     */
    getBigUint64(byteOffset?: number, littleEndian?: boolean): bigint;
    /**
     * Reads a 32-bit floating-point number (float32) at the given byteOffset
     * @param byteOffset - The position in the file to read from
     * @param littleEndian - Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
     * @returns The 32-bit floating-point number as a number
     */
    getFloat32(byteOffset?: number, littleEndian?: boolean): number;
    /**
     * Reads a 64-bit floating-point number (float64) at the given byteOffset
     * @param byteOffset - The position in the file to read from
     * @param littleEndian - Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
     * @returns The 64-bit floating-point number as a number
     */
    getFloat64(byteOffset?: number, littleEndian?: boolean): number;
    /**
     * Reads a signed 16-bit integer (int16) at the given byteOffset
     * @param byteOffset - The position in the file to read from
     * @param littleEndian - Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
     * @returns The 16-bit signed integer value as a number
     */
    getInt16(byteOffset?: number, littleEndian?: boolean): number;
    /**
     * Reads a signed 32-bit integer (int32) at the given byteOffset
     * @param byteOffset - The position in the file to read from
     * @param littleEndian - Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
     * @returns The 32-bit signed integer value as a number
     */
    getInt32(byteOffset?: number, littleEndian?: boolean): number;
    /**
     * Reads a signed byte (int8) at the given byteOffset
     * @param byteOffset - The position in the file to read from
     * @returns The byte value as a signed number
     */
    getInt8(byteOffset?: number): number;
    /**
     * Reads an unsigned 16-bit integer (uint16) at the given byteOffset
     * @param byteOffset - The position in the file to read from
     * @param littleEndian - Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
     * @returns The 16-bit unsigned integer value as a number
     */
    getUint16(byteOffset?: number, littleEndian?: boolean): number;
    /**
     * Reads an unsigned 32-bit integer (uint32) at the given byteOffset
     * @param byteOffset - The position in the file to read from
     * @param littleEndian - Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
     * @returns The 32-bit unsigned integer value as a number
     */
    getUint32(byteOffset?: number, littleEndian?: boolean): number;
    /**
     * Reads a single byte at the given byteOffset
     * @param byteOffset - The position in the file to read from
     * @returns The byte value as a number
     */
    getUint8(byteOffset?: number): number;
    /**
     * Get a slice of the file data as DataView
     * @param begin - Beginning of the slice
     * @param end - End of the slice. If not provided, the end of the data is used
     * @returns - The data as a DataView
     */
    slice(begin?: number, end?: number): DataView;
    /**
     * Fetch a slice at the current cursor position. The cursor is updated
     * @param size - size of the slice
     * @returns - a DataView of the slice
     */
    seekSlice(size: number): DataView;
    /**
     * Set the text decoder's encoding
     * @param encoding - update the text decoder's encoding
     */
    setStringEncoding(encoding: string): void;
    /**
     * Reads a string from the file
     * @param byteOffset - Start of the string
     * @param byteLength - Length of the string
     * @returns - The string
     */
    parseString(byteOffset?: number, byteLength?: number): string;
    /**
     * Reads a range from the file
     * @param offset - the offset of the range
     * @param length - the length of the range
     * @returns - the ranged buffer
     */
    getRange(offset: number, length: number): Promise<Uint8Array>;
    /** Closes the file */
    close(): void;
}
/**
 * Given a file and a file type, return a reader
 * @param filePath - The path to the file
 * @param type - The file type if specified, otherwise it will be inferred
 * @returns - The reader with {@link FeatureIterator} implemented
 */
export declare function fileTypeToReader(filePath: string, type?: string): Promise<FeatureIterator>;
//# sourceMappingURL=file.d.ts.map