@Deprecated
  static void writeCompressed(byte[] data, int offset, int length, DataOutput out, Dictionary dict)
    throws IOException {
    short dictIdx = Dictionary.NOT_IN_DICTIONARY;
    if (dict != null) {
      dictIdx = dict.findEntry(data, offset, length);
    }
    if (dictIdx == Dictionary.NOT_IN_DICTIONARY) {
      // not in dict
      out.writeByte(Dictionary.NOT_IN_DICTIONARY);
      WritableUtils.writeVInt(out, length);
      out.write(data, offset, length);
    } else {
      out.writeShort(dictIdx);
    }
  }
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