public static Compression.Algorithm compressionAlgorithmFromThrift(TCompressionAlgorithm in) {
    switch (in.getValue()) {
      case 0:
        return Compression.Algorithm.LZO;
      case 1:
        return Compression.Algorithm.GZ;
      case 2:
        return Compression.Algorithm.NONE;
      case 3:
        return Compression.Algorithm.SNAPPY;
      case 4:
        return Compression.Algorithm.LZ4;
      case 5:
        return Compression.Algorithm.BZIP2;
      case 6:
        return Compression.Algorithm.ZSTD;
      default:
        return Compression.Algorithm.NONE;
    }
  }
Adds all the attributes into the Operation object
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java