-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
qatzstd.proto
69 lines (57 loc) · 2.87 KB
/
qatzstd.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
syntax = "proto3";
package envoy.extensions.compression.qatzstd.compressor.v3alpha;
import "google/protobuf/wrappers.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.compression.qatzstd.compressor.v3alpha";
option java_outer_classname = "QatzstdProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/compression/qatzstd/compressor/v3alpha";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Qatzstd Compressor]
// Qatzstd :ref:`configuration overview <config_qatzstd>`.
// [#extension: envoy.compression.qatzstd.compressor]
// [#next-free-field: 8]
message Qatzstd {
// Reference to http://facebook.github.io/zstd/zstd_manual.html
enum Strategy {
DEFAULT = 0;
FAST = 1;
DFAST = 2;
GREEDY = 3;
LAZY = 4;
LAZY2 = 5;
BTLAZY2 = 6;
BTOPT = 7;
BTULTRA = 8;
BTULTRA2 = 9;
}
// Set compression parameters according to pre-defined compression level table.
// Note that exact compression parameters are dynamically determined,
// depending on both compression level and source content size (when known).
// Value 0 means default, and default level is 3.
//
// Setting a level does not automatically set all other compression parameters
// to default. Setting this will however eventually dynamically impact the compression
// parameters which have not been manually set. The manually set
// ones will 'stick'.
google.protobuf.UInt32Value compression_level = 1 [(validate.rules).uint32 = {lte: 22 gte: 1}];
// A 32-bits checksum of content is written at end of frame. If not set, defaults to false.
bool enable_checksum = 2;
// The higher the value of selected strategy, the more complex it is,
// resulting in stronger and slower compression.
//
// Special: value 0 means "use default strategy".
Strategy strategy = 3 [(validate.rules).enum = {defined_only: true}];
// Value for compressor's next output buffer. If not set, defaults to 4096.
google.protobuf.UInt32Value chunk_size = 5 [(validate.rules).uint32 = {lte: 65536 gte: 4096}];
// Enable QAT to accelerate Zstd compression or not. If not set, defaults to false.
//
// This is useful in the case that users want to enable QAT for a period of time and disable QAT for another period of time,
// they don't have to change the config too much or prepare for another config that has software zstd compressor and just changing the value of this filed.
bool enable_qat_zstd = 6;
// Fallback to software for Qatzstd when input size is less than this value.
// Valid only ``enable_qat_zstd`` is ``true``. 0 means no fallback at all. If not set, defaults to 4000.
google.protobuf.UInt32Value qat_zstd_fallback_threshold = 7
[(validate.rules).uint32 = {lte: 65536 gte: 0}];
}