static short toShort(byte hi, byte lo) {
    short s = (short) (((hi & 0xFF) << 8) | (lo & 0xFF));
    Preconditions.checkArgument(s >= 0);
    return s;
  }
Compresses and writes an array to a DataOutput
@param data the array to write.
@param out  the DataOutput to write into
@param dict the dictionary to use for compression
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/Compressor.java