For AI agents: the complete documentation index is available at /pds2img/llms.txt, the full documentation bundle is available at /pds2img/llms-full.txt, and this page is available as Markdown at /pds2img/api/types.md.

Types

All types are exported from the package root:

import type {
  BinarySource,
  PDS4DataType,
  PDSImage,
  PDSLabel,
  PDSQuantity,
  PDSValue
} from 'pds2img';

BinarySource

type BinarySource = ArrayBuffer | ArrayBufferView | Blob;

Binary input accepted by the loaders: ArrayBuffer, typed arrays, Node.js Buffer, Blob and File. Views are copied, so a pooled Buffer is never read past its own bytes.

PDSLabel

type PDSLabel = { [key: string]: PDSValue };

A parsed PDS3 label or a nested OBJECT / GROUP block.

PDSValue

type PDSValue = number | string | PDSValue[] | PDSQuantity | PDSLabel;

A value in a PDS3 label.

PDSQuantity

type PDSQuantity = { value: PDSValue; unit: string };

A value with a unit, such as 1.440 <SECOND>.

PDS4DataType

type PDS4DataType =
  | 'UnsignedByte'
  | 'SignedByte'
  | 'UnsignedMSB2'
  | 'UnsignedLSB2'
  | 'SignedMSB2'
  | 'SignedLSB2'
  | 'UnsignedMSB4'
  | 'UnsignedLSB4'
  | 'SignedMSB4'
  | 'SignedLSB4'
  | 'IEEE754MSBSingle'
  | 'IEEE754LSBSingle'
  | 'IEEE754MSBDouble'
  | 'IEEE754LSBDouble';

The PDS4 data_type values that PDS4Image can decode.

PDSImage

See Images.