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; } }
if (struct.isSetCompressionType()) { oprot.writeFieldBegin(COMPRESSION_TYPE_FIELD_DESC); oprot.writeI32(struct.compressionType.getValue()); oprot.writeFieldEnd();
oprot.writeI32(struct.compressionType.getValue());
hashCode = hashCode * 8191 + compressionType.getValue();