Here are a few basic articles on RAW files from digital cameras:
http://www.luminous-landscape.com/tutorials/understanding-series/u-raw-files.shtml
http://graphicssoft.about.com/od/glossary/f/raw.htm
http://en.wikipedia.org/wiki/Raw_image_format
I have to say that of all the myriad things that are different between a RAW file and a JPG file, compression would not be the first thing I would put at the top of the list.
The most important difference between the two is simply that the data stored in a raw file is not a bitmap of any sort, by any stretch of the imagination.
First, the raw data has to be de-mosaic'ed before it's in a format that looks like a bit map, ie r11, g11, b11, r12, g12, b12, etc. etc. Before de-mosaicing, the data is a jumble of values with many missing values that must be interpolated into existence.
IMHO, the 2nd and 3rd most importance differences between RAW files and any of the common file formats is that (a) the raw voltages that are linearly proportional to the intensity of each color at each pixel are transformed by a gamma curve to get the luminosity distribution acceptable to the eye, and (b) transform the raw color information into some device independent color space for eventual transformation into the desired output color space (eg, sRGB, ProPhoto, etc.)
Without 1, 2, and 3, above, you don't even have an image that could be compressed. However, once you have 1, 2, and 3, the output of the raw converter could be an uncompressed TIF, a BMP file, or any other common file format.
Tom M