common_primitives/parquet/
column_compression_codec.rs

1use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
2use scale_info::TypeInfo;
3use serde::{Deserialize, Serialize};
4
5/// Compression codecs: <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md>
6#[derive(
7	Clone, Encode, Decode, PartialEq, Debug, TypeInfo, Eq, MaxEncodedLen, Serialize, Deserialize,
8)]
9#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
10pub enum ColumnCompressionCodec {
11	/// Uncompressed
12	Uncompressed,
13	/// Snappy, aka Zippy, compression
14	Snappy,
15	/// Gzip compression
16	Gzip,
17	/// Lempel-Zip-Obenhumer compression: <https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Oberhumer>
18	Lzo,
19	/// Brotli compression
20	Brotli,
21	/// Zstandard compression: <https://en.wikipedia.org/wiki/Zstd>
22	ZSTD,
23	/// Lz4 compression without block headers
24	Lz4Raw,
25}
26
27impl Default for ColumnCompressionCodec {
28	fn default() -> Self {
29		Self::Uncompressed
30	}
31}