TPDFByteRangeArray
Document management, Performance, Concurrency
Description
TPDFByteRangeArray is a dynamic array of TPDFByteRange spans, each an absolute zero-based StartOffset and a ByteCount. Prefetch planners return it from BuildNextPlan to describe the regions a client should fetch next, and PLCollectRangeDataRequirements returns the missing ranges in the same form.
A span describes source bytes only; it carries no page or object identity, so the caller keeps the mapping between ranges and the data they serve.
Syntax
Delphi
TPDFByteRangeArray = Array Of TPDFByteRange;Fields
| StartOffset | Absolute zero-based offset of the first byte of the span |
|---|---|
| ByteCount | Number of bytes in the span; producers emit positive counts |
Remarks
The prefetch stream normalises a plan before fetching: it drops negative, empty or out-of-source ranges, extends each span by the read-ahead amount, aligns it to chunk boundaries, sorts the result and merges overlapping or adjacent spans.
PLCollectRangeDataRequirements returns missing ranges already sorted and merged, so a range-capable transport can fetch them with one request per span.
The array is a plain dynamic array owned by the caller, and each element is a value record with no references.
See also
IPLByteRangePrefetchPlanner, StartRangeSourcePrefetch, GetRangeSourceDataAvailability, LoadFromRangeSource, TPDFByteRangeCacheStats