When you get to the hair edge of creating your own packets to use in simulation of network traffic, using chars to store words is actually standard practice, as it is better than storing the actually binary strings and most shifts (all those %4==0) are easy enough. I just had an odd shift number.
Your absolutly correct with pack and unpack, but I'll be honest with you, I hate pack and unpack. I have to play with them for way too long usally to get them to do what I want.
Kwyjibo. A big, dumb, balding North American ape. With no chin.