/** * pds2img * * @description NASA Planetary Data System (PDS) to Image conversion library. * @author Logue * @license MIT * @version 0.3.0 * @see {@link https://github.com/logue/pds2img} */ /** * Low-level sample reader for PDS3 image data. * * The decoding strategy is derived from the PDS3 `SAMPLE_TYPE` and * `SAMPLE_BITS` keywords once, so per-pixel reads stay cheap. * * Supported sample types: * - Integers: `MSB_INTEGER`, `LSB_INTEGER`, `UNSIGNED_INTEGER`, `MSB_UNSIGNED_INTEGER`, * `LSB_UNSIGNED_INTEGER`, `PC_*`, `SUN_*`, `MAC_*`, `VAX_*` integer variants (8/16/32 bit) * - Reals: `IEEE_REAL`, `MSB_REAL`, `PC_REAL`, `LSB_REAL` (32/64 bit) */ export declare class BinaryReader { private readonly view; private readonly littleEndian; private readonly getter; /** Number of bytes occupied by a single sample. */ readonly bytesPerSample: number; /** * @param buffer - Raw image buffer. * @param sampleType - Value of the PDS3 `SAMPLE_TYPE` keyword. * @param bits - Value of the PDS3 `SAMPLE_BITS` keyword. * @throws {RangeError} If the combination is not supported. */ constructor(buffer: ArrayBuffer, sampleType: string, bits: number); private static resolveGetter; /** * Reads a raw (unscaled) sample at the given byte offset. * * @param offset - Byte offset within the buffer. */ read(offset: number): number; }