Skip to content

Commit 7924245

Browse files
committed
remote_exec.proto: support ZSTD with dictionary
Closes #272
1 parent 6c32c3b commit 7924245

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

build/bazel/remote/execution/v2/remote_execution.proto

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ message Compressor {
19481948
// not need to advertise it.
19491949
IDENTITY = 0;
19501950

1951-
// Zstandard compression.
1951+
// Zstandard compression without dictionary.
19521952
ZSTD = 1;
19531953

19541954
// RFC 1951 Deflate. This format is identical to what is used by ZIP
@@ -1961,9 +1961,30 @@ message Compressor {
19611961

19621962
// Brotli compression.
19631963
BROTLI = 3;
1964+
1965+
// Zstandard compression with dictionary.
1966+
//
1967+
// When this is used, the server MUST advertise the dictionaries by
1968+
// including
1969+
// [ZstdDictionaryRegistry][build.bazel.remote.execution.v2.ZstdDictionaryRegistry]
1970+
// digest in CacheCapabilities.
1971+
ZSTD_DICT = 4;
19641972
}
19651973
}
19661974

1975+
message ZstdDictionaryRegistry {
1976+
// Each file respresent a single Zstandard dictionary
1977+
// with name being the `dictId` that was added to the header
1978+
// of the compressed file.
1979+
//
1980+
// A special file with name `default` is used to represent the
1981+
// default dictionary that is used when no `dictId` is specified.
1982+
// Clients SHOULD prefer to use the default dictionary when possible.
1983+
//
1984+
// The `default` dictionary MUST be present.
1985+
repeated FileNode dictionaries = 1;
1986+
}
1987+
19671988
// Capabilities of the remote cache system.
19681989
message CacheCapabilities {
19691990
// All the digest functions supported by the remote cache.
@@ -1997,6 +2018,11 @@ message CacheCapabilities {
19972018
// [BatchUpdateBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs]
19982019
// requests.
19992020
repeated Compressor.Value supported_batch_update_compressors = 7;
2021+
2022+
// The digest of the
2023+
// [ZstdDictionaryRegistry][build.bazel.remote.execution.v2.ZstdDictionaryRegistry]
2024+
// that contains all the dictionaries supported by the remote cache.
2025+
Digest zstd_dictionary_registry = 8;
20002026
}
20012027

20022028
// Capabilities of the remote execution system.

0 commit comments

Comments
 (0)