I have never seen an example use for the mysterious Raw
function:
Raw[h, "hexstring"]
constructs a raw data object with head h, and with contents corresponding to the binary bit pattern represented by the string hexstring, interpreted as a hexadecimal number.
The documentation also makes clear that it must be used carefully:
Raw should be used only under very special circumstances.
It is possible to crash Mathematica by creating a fundamental Mathematica data object with Raw, and specifying illegal internal data for it. If you create an object with head Real, but with internal data incompatible with Mathematica Real numbers, you may end up crashing your whole Mathematica session.
In fact it also states: As of Version 6.0, Raw is no longer supported. Pre-v6.0 documentation gives some indication of application, no details, and more admonition:
As an optimization for some special kinds of computations, the raw data in Mathematica atomic objects can be given explicitly using
Raw[head, "hexstring"]
. The data is specified as a string of hexadecimal digits, corresponding to an array of bytes. When no special output form exists,InputForm
prints special objects usingRaw
. The behavior ofRaw
differs from one implementation of Mathematica to another; its general use is strongly discouraged.
Nevertheless I regularly find use for other deprecated functions such as Compose
and ToHeldExpression
, and I am curious. How can one use this function?
Raw
related toRawArray
? Whenever I look at theFullForm
of an image, it starts with:Image[RawArray["Byte", List[List[List[101, 133, 184],...
$\endgroup$?Raw*
there are several entries (ver. 9):Raw
,RawArray
,RawBoxes
,RawData
, andRawMedium
. All seem equally opaque! $\endgroup$