/** * Reader that parses a binary CMap stream and populates a character map. * * @private */ export declare class _PdfBinaryCharacterMapReader { /** * Maximum byte length used for temporary buffers while decoding. * * @private */ _maximumSize: number; /** * Converts a big-endian byte array (hex) to an unsigned integer. * * @private * @param {Uint8Array} data Byte array containing big-endian bytes. * @param {number} size Index of the last byte to include (0-based). * @returns {number} The converted unsigned integer. */ _convertHexToInt(data: Uint8Array, size: number): number; /** * Converts a byte array slice into a JavaScript string (UTF-16 code units). * * @private * @param {any} data Byte array or typed array containing character codes. * @param {number} size Last index (0-based) to include in the output. * @returns {string} The resulting string from the provided bytes. */ _hexArrayToString(data: any, size: number): string; /** * Adds two multi-byte big-endian arrays (place-wise) storing the result * back into the first array. * * @private * @param {Uint8Array} data Target byte array which receives the sum. * @param {Uint8Array} incrementData Byte array to add to the target. * @param {number} size Index of the last byte (0-based) to process. * @returns {void} nothing. */ _addHexData(data: Uint8Array, incrementData: Uint8Array, size: number): void; /** * Increments a multi-byte big-endian number stored in a byte array. * * @private * @param {Uint8Array} data Byte array holding the big-endian number. * @param {number} size Last index (0-based) to increment. * @returns {void} nothing. */ _performHexIncrement(data: Uint8Array, size: number): void; /** * Processes the binary CMap stream and populates the provided character map. * * @private * @param {any} data Raw CMap binary data (typed array or buffer). * @param {any} characterMap Target character map object to populate. * @param {any} enhance Optional callback to resolve useCharacterMap values. * @returns {any} The populated character map or the result of `enhance` when used. */ _process(data: any, characterMap: any, enhance: any): any; } /** * Internal binary reader for compact CMap streams used in PDF font mappings. * * Provides support for reading variable length encoded integers, signed values, * hex blocks, and CMap string entries following the PDF specification. * * @private */ export declare class _PdfBinaryCMapStream { /** * Backing buffer containing the binary CMap data. * * @private */ _buffer: any; /** * Current reading position within the buffer. * * @private */ _pos: number; /** * The end offset of the buffer (exclusive). * * @private */ _end: number; /** * Temporary buffer used for decoding variable length base 128 numbers. * * @private */ _tempBuffer: Uint8Array; /** * Maximum fixed byte size used for specific hex decoding cases. * * @private */ _maximumSize: number; /** * Maximum expected encoded number length for variable length integers. * * @private */ _maxEncodedNumberSize: number; constructor(data: any); /** * Reads a single byte from the stream. * * @private * @returns {any} The byte value or -1 if no more data is available. // eslint-disable-line */ _readByteData(): any; /** * Reads an unsigned variable length integer encoded in base 128 format. * * High bit (0x80) indicates continuation. * * @private * @returns {number} The decoded integer. */ _readNumber(): number; /** * Reads a signed variable length integer using zig zag encoding. * * @private * @returns {number} The decoded signed integer. */ _readSignedData(): number; _readHexData(number: any, size: number): void; /** * Reads a block of bytes and copies them into the provided buffer. * * Reads `size + 1` bytes from the current position. * * @private * @param {any} number Destination buffer. // eslint-disable-line * @param {number} size Number of bytes to read. * @returns {void} nothing. */ _readHexDataNumber(number: any, size: number): void; /** * Reads a signed hex encoded number and applies sign extension to the output bytes. * * @private * @param {any} number Destination byte array. // eslint-disable-line * @param {number} size Number of payload bytes. * @returns {void} nothing. */ _readHexSignedData(number: any, size: number): void; /** * Reads a string from the stream: * 1. Reads its length as a variable length integer. * 2. Reads `length` encoded integers. * 3. Converts them to a JavaScript string via char codes. * * @private * @returns {string} The decoded string. */ _readStringFromData(): string; }