In the PGP source code, the conversion from the byte value to a count is done by one line. This code is either by Colin Plumb or Derek Atkins and predates the formation of PGP, Inc. #define EXPBIAS 6 return ((PGPUInt32)16 + (c & 15)) << ((c >> 4) + EXPBIAS); Hal