TPLByteArray
Data types, cryptography
Description
TPLByteArray is a dynamic array of Byte, declared in PDFlibTypes and used across the library. It is the ordinary container for raw binary data: ICC profile bytes, CMap targets, buffer reads, certificate material and digest input.
The array is zero-based and starts empty (nil); allocate it with SetLength and index it from 0 to High. A parameter declared as TPLByteArray can be passed as const to avoid a copy or as var when the routine resizes or fills it.
Dynamic arrays are reference-counted, so assigning one variable to another shares the payload; use Copy when an independent buffer is required. Bytes may hold any value, including zero, because the array carries its own length instead of a terminator.
Syntax
Delphi
TPLByteArray = Array Of Byte;Remarks
DefaultRGBProfile returns the built-in sRGB ICC profile in this form.
DefaultRGBProfile returns nil when the profile resource cannot be loaded.
Read Length or High before indexing; an empty array has High equal to -1.
The array is reference-counted and freed automatically when its last reference goes away, so callers do not dispose of it explicitly.
The type is declared once, so the same dynamic-array type is used throughout the library rather than per-unit copies.