From: Joe Van Dyk Date: 2005-08-26T10:46:03+09:00 Subject: reading in C structs I have the following C struct: typedef struct { short Elev; /* vertex elevation */ u_char Zone; /* terrain fearture type */ u_char Mono; /* monochrome brightness value */ ulong rgb; /* rgb color components of vertex */ } cell_type The rgb values are bitshifted into the rgb ulong, and then the rgb ulong is converted to a network long. Then a bunch of those structs are written into a file. What's the Ruby way of getting the RGB values out? Is the unpack specification "sccN"? And then I'd unpack the network long with "cccc"?