@Deprecated
  static int uncompressIntoArray(byte[] to, int offset, DataInput in, Dictionary dict)
    throws IOException {
    byte status = in.readByte();

    if (status == Dictionary.NOT_IN_DICTIONARY) {
      // status byte indicating that data to be read is not in dictionary.
      // if this isn't in the dictionary, we need to add to the dictionary.
      int length = WritableUtils.readVInt(in);
      in.readFully(to, offset, length);
      dict.addEntry(to, offset, length);
      return length;
    } else {
      // the status byte also acts as the higher order byte of the dictionary
      // entry
      short dictIdx = toShort(status, in.readByte());
      byte[] entry;
      try {
        entry = dict.getEntry(dictIdx);
      } catch (Exception ex) {
        throw new IOException("Unable to uncompress the log entry", ex);
      }
      if (entry == null) {
        throw new IOException("Missing dictionary entry for index " + dictIdx);
      }
      // now we write the uncompressed value.
      Bytes.putBytes(to, offset, entry, 0, entry.length);
      return entry.length;
    }
  }
Reads a compressed entry into an array. The output into the array ends up length-prefixed.
@param to     the array to write into
@param offset array offset to start writing to
@param in     the DataInput to read from
@param dict   the dictionary to use for compression
@return the length of the uncompressed data
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/Compressor.java