MCPcopy Create free account
hub / github.com/bytedance/bolt / compressionKindToCodec

Function compressionKindToCodec

bolt/common/compression/Compression.cpp:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35namespace bytedance::bolt::common {
36
37std::unique_ptr<folly::io::Codec> compressionKindToCodec(CompressionKind kind) {
38 switch (static_cast<int32_t>(kind)) {
39 case CompressionKind_NONE:
40 return getCodec(folly::io::CodecType::NO_COMPRESSION);
41 case CompressionKind_ZLIB:
42 return getCodec(folly::io::CodecType::ZLIB);
43 case CompressionKind_SNAPPY:
44 return getCodec(folly::io::CodecType::SNAPPY);
45 case CompressionKind_ZSTD:
46 return getCodec(folly::io::CodecType::ZSTD);
47 case CompressionKind_LZ4:
48 return getCodec(folly::io::CodecType::LZ4);
49 case CompressionKind_GZIP:
50 return getCodec(folly::io::CodecType::GZIP);
51 default:
52 BOLT_UNSUPPORTED(
53 "Not support {} in folly", compressionKindToString(kind));
54 }
55}
56
57CompressionKind codecTypeToCompressionKind(folly::io::CodecType type) {
58 switch (type) {

Callers 6

ArrowVectorSerializerMethod · 0.85
deserializeMethod · 0.85
deserializeMethod · 0.85
TEST_FFunction · 0.85

Calls 1

compressionKindToStringFunction · 0.85

Tested by 1

TEST_FFunction · 0.68