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,InputFormprints special objects usingRaw. The behavior ofRawdiffers 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?
Rawrelated toRawArray? Whenever I look at theFullFormof an image, it starts with:Image[RawArray["Byte", List[List[List[101, 133, 184],...– bill s Jan 23 '14 at 19:34?Raw*there are several entries (ver. 9):Raw,RawArray,RawBoxes,RawData, andRawMedium. All seem equally opaque! – bill s Jan 23 '14 at 19:40Raw[List, "a"]gives 0. ButFullForm[Raw[List, "a"]]gives 1. – bill s Jan 24 '14 at 03:58CFormgives a bit more interesting results ("a" -> "0xa"). Also there is a special error if you try to compileRaw:Compile::cpw. – ybeltukov Jan 24 '14 at 04:19Composefunction? Are there cases when it cannot be replaced withComposition? – Vladimir Reshetnikov Jul 23 '14 at 01:41Composeoperation it is both cleaner and slightly faster than#1@#2 &. (Used here.) – Mr.Wizard Jul 23 '14 at 04:10