All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.parquet.format.CompressionCodec Maven / Gradle / Ivy

Go to download

Parquet is a columnar storage format that supports nested data. This provides all generated metadata code.

There is a newer version: 2.10.0
Show newest version
/**
 * Autogenerated by Thrift Compiler (0.7.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package org.apache.parquet.format;


import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;

/**
 * Supported compression algorithms.
 */
public enum CompressionCodec implements org.apache.thrift.TEnum {
  UNCOMPRESSED(0),
  SNAPPY(1),
  GZIP(2),
  LZO(3);

  private final int value;

  private CompressionCodec(int value) {
    this.value = value;
  }

  /**
   * Get the integer value of this enum value, as defined in the Thrift IDL.
   */
  public int getValue() {
    return value;
  }

  /**
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
   * @return null if the value is not found.
   */
  public static CompressionCodec findByValue(int value) { 
    switch (value) {
      case 0:
        return UNCOMPRESSED;
      case 1:
        return SNAPPY;
      case 2:
        return GZIP;
      case 3:
        return LZO;
      default:
        return null;
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy