Meta data

Occasionally, it can be useful to interrogate the properties of a stream, for example the length of the stream, or whether it is coming from a progressive source (see ProgressiveMode ProgressiveMode).

While not implemented currently, perhaps in future a particular stream user might want to interrogate information about the Mimetype of the stream, or its compression ratios.

To allow this, we have an extensible system to request Meta operations on a stream. The fz_stream_meta function allows such calls to be made, with a reason code to identify the required operation, and pointer and size parameters to identify data to be passed:


\begin{lstlisting}
/*
fz_stream_meta: Perform a meta call on a stream (typicall...
...fz_context *ctx, fz_stream *stm, int key, int size, void *ptr);
\end{lstlisting}