| synopsis || arguments || prev || next |
void create( kdu_compressed_source * source)
Java: void Create( Kdu_compressed_source source)
[Declared in "../coresys/common/kdu_compressed.h"]
Constructs the internal code-stream management machinery, to be accessed via the kdu_codestream interface and its close relatives, kdu_tile, kdu_tile_comp, kdu_resolution, kdu_subband, kdu_precinct and kdu_block.
We refer to the machinery created by this particular version of the overloaded create function as an input codestream, for want of more appropriate terminology. The function prepares the internal machinery for use in unpacking or decompressing an existing JPEG2000 code-stream, which is retrieved via the supplied source object on an as-needed basis.
For the same reasons mentioned in connection with the first version of the overloaded create function, the function is deliberately not implemented as a constructor and cannot be used unless (or until) the kdu_codestream interface is empty, meaning that its exists function returns false.
The function reads the main header of the JPEG2000 code-stream, up to but not including the first tile-part header. Further code-stream reading occurs on a strictly as-needed basis, as tile, precinct and code-block data is requested by the application, or the sample data processing machinery.
Points to the object which supplies the actual JPEG2000 code-stream data. The capabilities of this object can have a substantial impact on the behaviour of the internal machinery. For example, if the source object supports seeking, the internal machinery may be able to avoid buffering substantial amounts of compressed data, regardless of the order in which decompressed image data is required.
If the source provides its own compressed data cache, asynchonously loaded from a remote server, the internal code-stream management machinery will deliberately avoid caching parsed segments of compressed data, since this would prevent it from responding to changes in the state of the source object's cache.
The interested reader, should consult the descriptions provided for the kdu_compressed_source class and its member functions, as well as some of the more advanced derived classes such as kdu_cache, kdu_client or jp2_source.