public byte[] encodeBoolean(boolean b) {
    byte[] rv = new byte[1];
    rv[0] = (byte) (b ? '1' : '0');
    return rv;
  }
Get an instance of TranscoderUtils.

@param pack if true, remove all zero bytes from the MSB of the packed num
src/main/java/net/spy/memcached/transcoders/TranscoderUtils.java