Container for stream data that is more complex than a string.
This helper class wraps all information necessary to read stream data by using a Fiber object (see HexaPDF::Filter). The underlying data either comes from an IO object, a file represented by its file name or a Fiber defined via a Proc object.
Additionally, the filter
and decode_parms can
be set to indicate that the data returned from the Fiber needs to be
automatically normalized to arrays on assignment to ease further
The decoding parameters associated with the
The filter(s) that need to be applied for getting the decoded stream data.
The optional number of bytes to use starting from offset.
The optional offset into the bytes provided by source.
Public Class Methods
Creates a new StreamData object for the given
source and with the given options.
source can be:
An IO stream which is read starting from a specific
offsetfor a specific
A string which is interpreted as a file name and read starting from a specific
and for a specific
A Proc object (that is converted to a Fiber when needed) in which case the
offsetand value is ignored. The Proc object can also be passed by using a block.
Public Instance Methods
Returns whether this stream data object is equal to the other stream data object.
Returns a Fiber for getting at the data of the stream represented by this object.