From f9cad5e10fa60cb5d7a506a42b8b95901cfa8479 Mon Sep 17 00:00:00 2001 From: Son Luong Ngoc Date: Fri, 6 Oct 2023 14:24:46 +0200 Subject: [PATCH] proto: supporting zstd dictionary DO NOT MERGE. This is mainly served as a conversation starter for future dictionary compression features. --- proto/remote_execution.proto | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/proto/remote_execution.proto b/proto/remote_execution.proto index edfa728a2e8..035844e24db 100644 --- a/proto/remote_execution.proto +++ b/proto/remote_execution.proto @@ -2000,6 +2000,9 @@ message Compressor { // Brotli compression. BROTLI = 3; + + // Zstandard compression with external dictionary support. + ZSTD_DICT = 4; } } @@ -2036,6 +2039,24 @@ message CacheCapabilities { // [BatchUpdateBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs] // requests. repeated Compressor.Value supported_batch_update_compressors = 7; + + // BUILDBUDDY EXTENSIONS BELOW + + // A digest pointing to a [ZstdDictionaryRegistry][build.bazel.remote.execution.v2.ZstdDictionaryRegistry] + // object in CAS that contains the zstd dictionaries that should be used for + // compressing and decompressing blobs. + // + // This MUST be set if the server supports ZSTD_DICT compression. + Digest zstd_dictionary_registry = 1000; +} + +message ZstdDictionaryRegistry { + // Each file's name should be set to either the dictID of the ZSTD dictionary (32 bits unsigned integer), + // or "default" for the default dictionary that client SHOULD use to compress uploaded data. + // + // A "default" dictionary MUST always be present. + // The server MUST ensure that all listed dictionaries are accessible throughout the invocation duration. + repeated FileNode dictionaries = 1; } // Capabilities of the remote execution system.