private byte getLeftBit (byte b) { byte mask = (byte)0x80; while ( (mask&b) == 0) mask >>>= 1; return mask; }