Merge pull request #14343 from muxi/revert-12708

Revert breaking API in #12708
pull/14351/head
Muxi Yan 7 years ago committed by GitHub
commit fb369d9567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      BUILD
  2. 11
      CMakeLists.txt
  3. 11
      Makefile
  4. 2
      build.yaml
  5. 1
      config.m4
  6. 1
      config.w32
  7. 2
      gRPC-Core.podspec
  8. 2
      grpc.def
  9. 2
      grpc.gemspec
  10. 4
      grpc.gyp
  11. 48
      include/grpc/compression_ruby.h
  12. 4
      include/grpc/impl/codegen/compression_types.h
  13. 1
      include/grpc/module.modulemap
  14. 2
      package.xml
  15. 37
      src/core/lib/compression/compression.cc
  16. 8
      src/core/lib/compression/compression_internal.cc
  17. 66
      src/core/lib/compression/compression_ruby.cc
  18. 461
      src/core/lib/transport/static_metadata.cc
  19. 147
      src/core/lib/transport/static_metadata.h
  20. 2
      src/csharp/Grpc.IntegrationTesting/InteropClient.cs
  21. 4
      src/objective-c/GRPCClient/GRPCCall+ChannelArg.m
  22. 4
      src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
  23. 4
      src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
  24. 1
      src/python/grpcio/grpc_core_dependencies.py
  25. 5
      src/ruby/ext/grpc/rb_compression_options.c
  26. 4
      src/ruby/ext/grpc/rb_grpc_imports.generated.c
  27. 7
      src/ruby/ext/grpc/rb_grpc_imports.generated.h
  28. 18
      test/core/channel/channel_args_test.cc
  29. 2
      test/core/compression/algorithm_test.cc
  30. 50
      test/core/compression/compression_test.cc
  31. 4
      test/core/end2end/fixtures/h2_compress.cc
  32. 6
      test/core/end2end/fuzzers/hpack.dictionary
  33. 37
      test/core/end2end/tests/compressed_payload.cc
  34. 4
      test/core/end2end/tests/stream_compression_compressed_payload.cc
  35. 13
      test/core/end2end/tests/workaround_cronet_compression.cc
  36. 6
      test/core/surface/byte_buffer_reader_test.cc
  37. 3
      test/core/surface/public_headers_must_be_c89.c
  38. 2
      test/cpp/end2end/end2end_test.cc
  39. 2
      test/cpp/end2end/filter_end2end_test.cc
  40. 2
      test/cpp/end2end/generic_end2end_test.cc
  41. 2
      test/cpp/end2end/server_builder_plugin_test.cc
  42. 4
      test/cpp/interop/interop_client.cc
  43. 4
      tools/codegen/core/gen_static_metadata.py
  44. 1
      tools/doxygen/Doxyfile.c++
  45. 1
      tools/doxygen/Doxyfile.c++.internal
  46. 1
      tools/doxygen/Doxyfile.core
  47. 2
      tools/doxygen/Doxyfile.core.internal
  48. 3
      tools/run_tests/generated/sources_and_headers.json

@ -93,7 +93,6 @@ GRPC_PUBLIC_HDRS = [
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/compression_ruby.h",
"include/grpc/fork.h",
"include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
@ -639,7 +638,6 @@ grpc_cc_library(
"src/core/lib/channel/handshaker_registry.cc",
"src/core/lib/compression/compression.cc",
"src/core/lib/compression/compression_internal.cc",
"src/core/lib/compression/compression_ruby.cc",
"src/core/lib/compression/message_compress.cc",
"src/core/lib/compression/stream_compression.cc",
"src/core/lib/compression/stream_compression_gzip.cc",

@ -803,7 +803,6 @@ add_library(grpc
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -1104,7 +1103,6 @@ foreach(_hdr
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/compression.h
include/grpc/compression_ruby.h
include/grpc/fork.h
include/grpc/grpc.h
include/grpc/grpc_posix.h
@ -1145,7 +1143,6 @@ add_library(grpc_cronet
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -1469,7 +1466,6 @@ add_library(grpc_test_util
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -1737,7 +1733,6 @@ add_library(grpc_test_util_unsecure
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -1988,7 +1983,6 @@ add_library(grpc_unsecure
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -2255,7 +2249,6 @@ foreach(_hdr
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/compression.h
include/grpc/compression_ruby.h
include/grpc/fork.h
include/grpc/grpc.h
include/grpc/grpc_posix.h
@ -2530,7 +2523,6 @@ foreach(_hdr
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/compression.h
include/grpc/compression_ruby.h
include/grpc/fork.h
include/grpc/grpc.h
include/grpc/grpc_posix.h
@ -2722,7 +2714,6 @@ add_library(grpc++_cronet
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -3005,7 +2996,6 @@ foreach(_hdr
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/compression.h
include/grpc/compression_ruby.h
include/grpc/fork.h
include/grpc/grpc.h
include/grpc/grpc_posix.h
@ -3736,7 +3726,6 @@ foreach(_hdr
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/compression.h
include/grpc/compression_ruby.h
include/grpc/fork.h
include/grpc/grpc.h
include/grpc/grpc_posix.h

@ -3029,7 +3029,6 @@ LIBGRPC_SRC = \
src/core/lib/channel/handshaker_registry.cc \
src/core/lib/compression/compression.cc \
src/core/lib/compression/compression_internal.cc \
src/core/lib/compression/compression_ruby.cc \
src/core/lib/compression/message_compress.cc \
src/core/lib/compression/stream_compression.cc \
src/core/lib/compression/stream_compression_gzip.cc \
@ -3297,7 +3296,6 @@ PUBLIC_HEADERS_C += \
include/grpc/byte_buffer.h \
include/grpc/byte_buffer_reader.h \
include/grpc/compression.h \
include/grpc/compression_ruby.h \
include/grpc/fork.h \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \
@ -3373,7 +3371,6 @@ LIBGRPC_CRONET_SRC = \
src/core/lib/channel/handshaker_registry.cc \
src/core/lib/compression/compression.cc \
src/core/lib/compression/compression_internal.cc \
src/core/lib/compression/compression_ruby.cc \
src/core/lib/compression/message_compress.cc \
src/core/lib/compression/stream_compression.cc \
src/core/lib/compression/stream_compression_gzip.cc \
@ -3698,7 +3695,6 @@ LIBGRPC_TEST_UTIL_SRC = \
src/core/lib/channel/handshaker_registry.cc \
src/core/lib/compression/compression.cc \
src/core/lib/compression/compression_internal.cc \
src/core/lib/compression/compression_ruby.cc \
src/core/lib/compression/message_compress.cc \
src/core/lib/compression/stream_compression.cc \
src/core/lib/compression/stream_compression_gzip.cc \
@ -3959,7 +3955,6 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
src/core/lib/channel/handshaker_registry.cc \
src/core/lib/compression/compression.cc \
src/core/lib/compression/compression_internal.cc \
src/core/lib/compression/compression_ruby.cc \
src/core/lib/compression/message_compress.cc \
src/core/lib/compression/stream_compression.cc \
src/core/lib/compression/stream_compression_gzip.cc \
@ -4190,7 +4185,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/channel/handshaker_registry.cc \
src/core/lib/compression/compression.cc \
src/core/lib/compression/compression_internal.cc \
src/core/lib/compression/compression_ruby.cc \
src/core/lib/compression/message_compress.cc \
src/core/lib/compression/stream_compression.cc \
src/core/lib/compression/stream_compression_gzip.cc \
@ -4425,7 +4419,6 @@ PUBLIC_HEADERS_C += \
include/grpc/byte_buffer.h \
include/grpc/byte_buffer_reader.h \
include/grpc/compression.h \
include/grpc/compression_ruby.h \
include/grpc/fork.h \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \
@ -4685,7 +4678,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc/byte_buffer.h \
include/grpc/byte_buffer_reader.h \
include/grpc/compression.h \
include/grpc/compression_ruby.h \
include/grpc/fork.h \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \
@ -4925,7 +4917,6 @@ LIBGRPC++_CRONET_SRC = \
src/core/lib/channel/handshaker_registry.cc \
src/core/lib/compression/compression.cc \
src/core/lib/compression/compression_internal.cc \
src/core/lib/compression/compression_ruby.cc \
src/core/lib/compression/message_compress.cc \
src/core/lib/compression/stream_compression.cc \
src/core/lib/compression/stream_compression_gzip.cc \
@ -5173,7 +5164,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc/byte_buffer.h \
include/grpc/byte_buffer_reader.h \
include/grpc/compression.h \
include/grpc/compression_ruby.h \
include/grpc/fork.h \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \
@ -5893,7 +5883,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc/byte_buffer.h \
include/grpc/byte_buffer_reader.h \
include/grpc/compression.h \
include/grpc/compression_ruby.h \
include/grpc/fork.h \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \

@ -160,7 +160,6 @@ filegroups:
- src/core/lib/channel/handshaker_registry.cc
- src/core/lib/compression/compression.cc
- src/core/lib/compression/compression_internal.cc
- src/core/lib/compression/compression_ruby.cc
- src/core/lib/compression/message_compress.cc
- src/core/lib/compression/stream_compression.cc
- src/core/lib/compression/stream_compression_gzip.cc
@ -296,7 +295,6 @@ filegroups:
- include/grpc/byte_buffer.h
- include/grpc/byte_buffer_reader.h
- include/grpc/compression.h
- include/grpc/compression_ruby.h
- include/grpc/fork.h
- include/grpc/grpc.h
- include/grpc/grpc_posix.h

@ -94,7 +94,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/channel/handshaker_registry.cc \
src/core/lib/compression/compression.cc \
src/core/lib/compression/compression_internal.cc \
src/core/lib/compression/compression_ruby.cc \
src/core/lib/compression/message_compress.cc \
src/core/lib/compression/stream_compression.cc \
src/core/lib/compression/stream_compression_gzip.cc \

@ -71,7 +71,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\channel\\handshaker_registry.cc " +
"src\\core\\lib\\compression\\compression.cc " +
"src\\core\\lib\\compression\\compression_internal.cc " +
"src\\core\\lib\\compression\\compression_ruby.cc " +
"src\\core\\lib\\compression\\message_compress.cc " +
"src\\core\\lib\\compression\\stream_compression.cc " +
"src\\core\\lib\\compression\\stream_compression_gzip.cc " +

@ -173,7 +173,6 @@ Pod::Spec.new do |s|
'include/grpc/byte_buffer.h',
'include/grpc/byte_buffer_reader.h',
'include/grpc/compression.h',
'include/grpc/compression_ruby.h',
'include/grpc/fork.h',
'include/grpc/grpc.h',
'include/grpc/grpc_posix.h',
@ -481,7 +480,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/handshaker_registry.cc',
'src/core/lib/compression/compression.cc',
'src/core/lib/compression/compression_internal.cc',
'src/core/lib/compression/compression_ruby.cc',
'src/core/lib/compression/message_compress.cc',
'src/core/lib/compression/stream_compression.cc',
'src/core/lib/compression/stream_compression_gzip.cc',

@ -8,8 +8,6 @@ EXPORTS
grpc_compression_options_enable_algorithm
grpc_compression_options_disable_algorithm
grpc_compression_options_is_algorithm_enabled
grpc_compression_algorithm_parse_ruby
grpc_compression_algorithm_name_ruby
grpc_metadata_array_init
grpc_metadata_array_destroy
grpc_call_details_init

@ -170,7 +170,6 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/byte_buffer.h )
s.files += %w( include/grpc/byte_buffer_reader.h )
s.files += %w( include/grpc/compression.h )
s.files += %w( include/grpc/compression_ruby.h )
s.files += %w( include/grpc/fork.h )
s.files += %w( include/grpc/grpc.h )
s.files += %w( include/grpc/grpc_posix.h )
@ -411,7 +410,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/channel/handshaker_registry.cc )
s.files += %w( src/core/lib/compression/compression.cc )
s.files += %w( src/core/lib/compression/compression_internal.cc )
s.files += %w( src/core/lib/compression/compression_ruby.cc )
s.files += %w( src/core/lib/compression/message_compress.cc )
s.files += %w( src/core/lib/compression/stream_compression.cc )
s.files += %w( src/core/lib/compression/stream_compression_gzip.cc )

@ -235,7 +235,6 @@
'src/core/lib/channel/handshaker_registry.cc',
'src/core/lib/compression/compression.cc',
'src/core/lib/compression/compression_internal.cc',
'src/core/lib/compression/compression_ruby.cc',
'src/core/lib/compression/message_compress.cc',
'src/core/lib/compression/stream_compression.cc',
'src/core/lib/compression/stream_compression_gzip.cc',
@ -530,7 +529,6 @@
'src/core/lib/channel/handshaker_registry.cc',
'src/core/lib/compression/compression.cc',
'src/core/lib/compression/compression_internal.cc',
'src/core/lib/compression/compression_ruby.cc',
'src/core/lib/compression/message_compress.cc',
'src/core/lib/compression/stream_compression.cc',
'src/core/lib/compression/stream_compression_gzip.cc',
@ -743,7 +741,6 @@
'src/core/lib/channel/handshaker_registry.cc',
'src/core/lib/compression/compression.cc',
'src/core/lib/compression/compression_internal.cc',
'src/core/lib/compression/compression_ruby.cc',
'src/core/lib/compression/message_compress.cc',
'src/core/lib/compression/stream_compression.cc',
'src/core/lib/compression/stream_compression_gzip.cc',
@ -938,7 +935,6 @@
'src/core/lib/channel/handshaker_registry.cc',
'src/core/lib/compression/compression.cc',
'src/core/lib/compression/compression_internal.cc',
'src/core/lib/compression/compression_ruby.cc',
'src/core/lib/compression/message_compress.cc',
'src/core/lib/compression/stream_compression.cc',
'src/core/lib/compression/stream_compression_gzip.cc',

@ -1,48 +0,0 @@
/*
*
* Copyright 2017 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GRPC_COMPRESSION_RUBY_H
#define GRPC_COMPRESSION_RUBY_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/slice.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Parses the \a slice as a grpc_compression_algorithm instance and updating \a
* algorithm following algorithm names compatible with Ruby. Returns 1 upon
* success, 0 otherwise. */
GRPCAPI int grpc_compression_algorithm_parse_ruby(
grpc_slice value, grpc_compression_algorithm* algorithm);
/** Updates \a name with the encoding name corresponding to a valid \a
* algorithm. The \a name follows names compatible with Ruby. Note that \a name
* is statically allocated and must *not* be freed. Returns 1 upon success, 0
* otherwise. */
GRPCAPI int grpc_compression_algorithm_name_ruby(
grpc_compression_algorithm algorithm, const char** name);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_COMPRESSION_RUBY_H */

@ -55,8 +55,8 @@ extern "C" {
/** The various compression algorithms supported by gRPC */
typedef enum {
GRPC_COMPRESS_NONE = 0,
GRPC_COMPRESS_MESSAGE_DEFLATE,
GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_COMPRESS_DEFLATE,
GRPC_COMPRESS_GZIP,
GRPC_COMPRESS_STREAM_GZIP,
/* TODO(ctiller): snappy */
GRPC_COMPRESS_ALGORITHMS_COUNT

@ -45,7 +45,6 @@ framework module grpc {
header "byte_buffer.h"
header "byte_buffer_reader.h"
header "compression.h"
header "compression_ruby.h"
header "fork.h"
header "grpc.h"
header "grpc_posix.h"

@ -177,7 +177,6 @@
<file baseinstalldir="/" name="include/grpc/byte_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/byte_buffer_reader.h" role="src" />
<file baseinstalldir="/" name="include/grpc/compression.h" role="src" />
<file baseinstalldir="/" name="include/grpc/compression_ruby.h" role="src" />
<file baseinstalldir="/" name="include/grpc/fork.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_posix.h" role="src" />
@ -418,7 +417,6 @@
<file baseinstalldir="/" name="src/core/lib/channel/handshaker_registry.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/compression.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/compression_internal.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/compression_ruby.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/message_compress.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/stream_compression.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/stream_compression_gzip.cc" role="src" />

@ -29,8 +29,7 @@
int grpc_compression_algorithm_is_message(
grpc_compression_algorithm algorithm) {
return (algorithm >= GRPC_COMPRESS_MESSAGE_DEFLATE &&
algorithm <= GRPC_COMPRESS_MESSAGE_GZIP)
return (algorithm >= GRPC_COMPRESS_DEFLATE && algorithm <= GRPC_COMPRESS_GZIP)
? 1
: 0;
}
@ -44,11 +43,11 @@ int grpc_compression_algorithm_parse(grpc_slice name,
if (grpc_slice_eq(name, GRPC_MDSTR_IDENTITY)) {
*algorithm = GRPC_COMPRESS_NONE;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_MESSAGE_SLASH_DEFLATE)) {
*algorithm = GRPC_COMPRESS_MESSAGE_DEFLATE;
} else if (grpc_slice_eq(name, GRPC_MDSTR_DEFLATE)) {
*algorithm = GRPC_COMPRESS_DEFLATE;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_MESSAGE_SLASH_GZIP)) {
*algorithm = GRPC_COMPRESS_MESSAGE_GZIP;
} else if (grpc_slice_eq(name, GRPC_MDSTR_GZIP)) {
*algorithm = GRPC_COMPRESS_GZIP;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_STREAM_SLASH_GZIP)) {
*algorithm = GRPC_COMPRESS_STREAM_GZIP;
@ -67,11 +66,11 @@ int grpc_compression_algorithm_name(grpc_compression_algorithm algorithm,
case GRPC_COMPRESS_NONE:
*name = "identity";
return 1;
case GRPC_COMPRESS_MESSAGE_DEFLATE:
*name = "message/deflate";
case GRPC_COMPRESS_DEFLATE:
*name = "deflate";
return 1;
case GRPC_COMPRESS_MESSAGE_GZIP:
*name = "message/gzip";
case GRPC_COMPRESS_GZIP:
*name = "gzip";
return 1;
case GRPC_COMPRESS_STREAM_GZIP:
*name = "stream/gzip";
@ -133,10 +132,10 @@ grpc_slice grpc_compression_algorithm_slice(
switch (algorithm) {
case GRPC_COMPRESS_NONE:
return GRPC_MDSTR_IDENTITY;
case GRPC_COMPRESS_MESSAGE_DEFLATE:
return GRPC_MDSTR_MESSAGE_SLASH_DEFLATE;
case GRPC_COMPRESS_MESSAGE_GZIP:
return GRPC_MDSTR_MESSAGE_SLASH_GZIP;
case GRPC_COMPRESS_DEFLATE:
return GRPC_MDSTR_DEFLATE;
case GRPC_COMPRESS_GZIP:
return GRPC_MDSTR_GZIP;
case GRPC_COMPRESS_STREAM_GZIP:
return GRPC_MDSTR_STREAM_SLASH_GZIP;
case GRPC_COMPRESS_ALGORITHMS_COUNT:
@ -148,10 +147,8 @@ grpc_slice grpc_compression_algorithm_slice(
grpc_compression_algorithm grpc_compression_algorithm_from_slice(
grpc_slice str) {
if (grpc_slice_eq(str, GRPC_MDSTR_IDENTITY)) return GRPC_COMPRESS_NONE;
if (grpc_slice_eq(str, GRPC_MDSTR_MESSAGE_SLASH_DEFLATE))
return GRPC_COMPRESS_MESSAGE_DEFLATE;
if (grpc_slice_eq(str, GRPC_MDSTR_MESSAGE_SLASH_GZIP))
return GRPC_COMPRESS_MESSAGE_GZIP;
if (grpc_slice_eq(str, GRPC_MDSTR_DEFLATE)) return GRPC_COMPRESS_DEFLATE;
if (grpc_slice_eq(str, GRPC_MDSTR_GZIP)) return GRPC_COMPRESS_GZIP;
if (grpc_slice_eq(str, GRPC_MDSTR_STREAM_SLASH_GZIP))
return GRPC_COMPRESS_STREAM_GZIP;
return GRPC_COMPRESS_ALGORITHMS_COUNT;
@ -162,9 +159,9 @@ grpc_mdelem grpc_compression_encoding_mdelem(
switch (algorithm) {
case GRPC_COMPRESS_NONE:
return GRPC_MDELEM_GRPC_ENCODING_IDENTITY;
case GRPC_COMPRESS_MESSAGE_DEFLATE:
case GRPC_COMPRESS_DEFLATE:
return GRPC_MDELEM_GRPC_ENCODING_DEFLATE;
case GRPC_COMPRESS_MESSAGE_GZIP:
case GRPC_COMPRESS_GZIP:
return GRPC_MDELEM_GRPC_ENCODING_GZIP;
case GRPC_COMPRESS_STREAM_GZIP:
return GRPC_MDELEM_GRPC_ENCODING_GZIP;

@ -80,9 +80,9 @@ grpc_message_compression_algorithm
grpc_compression_algorithm_to_message_compression_algorithm(
grpc_compression_algorithm algo) {
switch (algo) {
case GRPC_COMPRESS_MESSAGE_DEFLATE:
case GRPC_COMPRESS_DEFLATE:
return GRPC_MESSAGE_COMPRESS_DEFLATE;
case GRPC_COMPRESS_MESSAGE_GZIP:
case GRPC_COMPRESS_GZIP:
return GRPC_MESSAGE_COMPRESS_GZIP;
default:
return GRPC_MESSAGE_COMPRESS_NONE;
@ -147,10 +147,10 @@ int grpc_compression_algorithm_from_message_stream_compression_algorithm(
*algorithm = GRPC_COMPRESS_NONE;
return 1;
case GRPC_MESSAGE_COMPRESS_DEFLATE:
*algorithm = GRPC_COMPRESS_MESSAGE_DEFLATE;
*algorithm = GRPC_COMPRESS_DEFLATE;
return 1;
case GRPC_MESSAGE_COMPRESS_GZIP:
*algorithm = GRPC_COMPRESS_MESSAGE_GZIP;
*algorithm = GRPC_COMPRESS_GZIP;
return 1;
default:
*algorithm = GRPC_COMPRESS_NONE;

@ -1,66 +0,0 @@
/*
*
* Copyright 2017 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#include <grpc/compression_ruby.h>
#include <grpc/support/useful.h>
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/static_metadata.h"
int grpc_compression_algorithm_parse_ruby(
grpc_slice name, grpc_compression_algorithm* algorithm) {
if (grpc_slice_eq(name, GRPC_MDSTR_IDENTITY)) {
*algorithm = GRPC_COMPRESS_NONE;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_DEFLATE)) {
*algorithm = GRPC_COMPRESS_MESSAGE_DEFLATE;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_GZIP)) {
*algorithm = GRPC_COMPRESS_MESSAGE_GZIP;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_STREAM_SLASH_GZIP)) {
*algorithm = GRPC_COMPRESS_STREAM_GZIP;
return 1;
} else {
return 0;
}
return 0;
}
int grpc_compression_algorithm_name_ruby(grpc_compression_algorithm algorithm,
const char** name) {
GRPC_API_TRACE("grpc_compression_algorithm_parse(algorithm=%d, name=%p)", 2,
((int)algorithm, name));
switch (algorithm) {
case GRPC_COMPRESS_NONE:
*name = "identity";
return 1;
case GRPC_COMPRESS_MESSAGE_DEFLATE:
*name = "deflate";
return 1;
case GRPC_COMPRESS_MESSAGE_GZIP:
*name = "gzip";
return 1;
case GRPC_COMPRESS_STREAM_GZIP:
*name = "stream/gzip";
return 1;
case GRPC_COMPRESS_ALGORITHMS_COUNT:
return 0;
}
return 0;
}

@ -20,7 +20,7 @@
* To make changes to this file, change
* tools/codegen/core/gen_static_metadata.py, and then re-run it.
*
* See metadata.h for an explanation of the interface here, and metadata.c for
* See metadata.h for an explanation of the interface here, and metadata.cc for
* an explanation of what's going on.
*/
@ -57,53 +57,52 @@ static uint8_t g_bytes[] = {
112, 111, 110, 115, 101, 95, 109, 101, 115, 115, 97, 103, 101, 95, 98,
121, 116, 101, 115, 47, 103, 114, 112, 99, 46, 108, 98, 46, 118, 49,
46, 76, 111, 97, 100, 66, 97, 108, 97, 110, 99, 101, 114, 47, 66,
97, 108, 97, 110, 99, 101, 76, 111, 97, 100, 109, 101, 115, 115, 97,
103, 101, 47, 100, 101, 102, 108, 97, 116, 101, 109, 101, 115, 115, 97,
103, 101, 47, 103, 122, 105, 112, 115, 116, 114, 101, 97, 109, 47, 103,
122, 105, 112, 48, 49, 50, 105, 100, 101, 110, 116, 105, 116, 121, 103,
122, 105, 112, 100, 101, 102, 108, 97, 116, 101, 116, 114, 97, 105, 108,
101, 114, 115, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47,
103, 114, 112, 99, 80, 79, 83, 84, 50, 48, 48, 52, 48, 52, 104,
116, 116, 112, 104, 116, 116, 112, 115, 103, 114, 112, 99, 71, 69, 84,
80, 85, 84, 47, 47, 105, 110, 100, 101, 120, 46, 104, 116, 109, 108,
50, 48, 52, 50, 48, 54, 51, 48, 52, 52, 48, 48, 53, 48, 48,
97, 99, 99, 101, 112, 116, 45, 99, 104, 97, 114, 115, 101, 116, 103,
122, 105, 112, 44, 32, 100, 101, 102, 108, 97, 116, 101, 97, 99, 99,
101, 112, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 97, 99, 99,
101, 112, 116, 45, 114, 97, 110, 103, 101, 115, 97, 99, 99, 101, 112,
116, 97, 99, 99, 101, 115, 115, 45, 99, 111, 110, 116, 114, 111, 108,
45, 97, 108, 108, 111, 119, 45, 111, 114, 105, 103, 105, 110, 97, 103,
101, 97, 108, 108, 111, 119, 97, 117, 116, 104, 111, 114, 105, 122, 97,
116, 105, 111, 110, 99, 97, 99, 104, 101, 45, 99, 111, 110, 116, 114,
111, 108, 99, 111, 110, 116, 101, 110, 116, 45, 100, 105, 115, 112, 111,
115, 105, 116, 105, 111, 110, 99, 111, 110, 116, 101, 110, 116, 45, 108,
97, 110, 103, 117, 97, 103, 101, 99, 111, 110, 116, 101, 110, 116, 45,
108, 101, 110, 103, 116, 104, 99, 111, 110, 116, 101, 110, 116, 45, 108,
111, 99, 97, 116, 105, 111, 110, 99, 111, 110, 116, 101, 110, 116, 45,
114, 97, 110, 103, 101, 99, 111, 111, 107, 105, 101, 100, 97, 116, 101,
101, 116, 97, 103, 101, 120, 112, 101, 99, 116, 101, 120, 112, 105, 114,
101, 115, 102, 114, 111, 109, 105, 102, 45, 109, 97, 116, 99, 104, 105,
102, 45, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105, 110, 99,
101, 105, 102, 45, 110, 111, 110, 101, 45, 109, 97, 116, 99, 104, 105,
102, 45, 114, 97, 110, 103, 101, 105, 102, 45, 117, 110, 109, 111, 100,
105, 102, 105, 101, 100, 45, 115, 105, 110, 99, 101, 108, 97, 115, 116,
45, 109, 111, 100, 105, 102, 105, 101, 100, 108, 98, 45, 99, 111, 115,
116, 45, 98, 105, 110, 108, 105, 110, 107, 108, 111, 99, 97, 116, 105,
111, 110, 109, 97, 120, 45, 102, 111, 114, 119, 97, 114, 100, 115, 112,
114, 111, 120, 121, 45, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97,
116, 101, 112, 114, 111, 120, 121, 45, 97, 117, 116, 104, 111, 114, 105,
122, 97, 116, 105, 111, 110, 114, 97, 110, 103, 101, 114, 101, 102, 101,
114, 101, 114, 114, 101, 102, 114, 101, 115, 104, 114, 101, 116, 114, 121,
45, 97, 102, 116, 101, 114, 115, 101, 114, 118, 101, 114, 115, 101, 116,
45, 99, 111, 111, 107, 105, 101, 115, 116, 114, 105, 99, 116, 45, 116,
114, 97, 110, 115, 112, 111, 114, 116, 45, 115, 101, 99, 117, 114, 105,
116, 121, 116, 114, 97, 110, 115, 102, 101, 114, 45, 101, 110, 99, 111,
100, 105, 110, 103, 118, 97, 114, 121, 118, 105, 97, 119, 119, 119, 45,
97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 105, 100, 101,
110, 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 105, 100,
101, 110, 116, 105, 116, 121, 44, 103, 122, 105, 112, 100, 101, 102, 108,
97, 116, 101, 44, 103, 122, 105, 112, 105, 100, 101, 110, 116, 105, 116,
121, 44, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122, 105, 112};
97, 108, 97, 110, 99, 101, 76, 111, 97, 100, 100, 101, 102, 108, 97,
116, 101, 103, 122, 105, 112, 115, 116, 114, 101, 97, 109, 47, 103, 122,
105, 112, 48, 49, 50, 105, 100, 101, 110, 116, 105, 116, 121, 116, 114,
97, 105, 108, 101, 114, 115, 97, 112, 112, 108, 105, 99, 97, 116, 105,
111, 110, 47, 103, 114, 112, 99, 80, 79, 83, 84, 50, 48, 48, 52,
48, 52, 104, 116, 116, 112, 104, 116, 116, 112, 115, 103, 114, 112, 99,
71, 69, 84, 80, 85, 84, 47, 47, 105, 110, 100, 101, 120, 46, 104,
116, 109, 108, 50, 48, 52, 50, 48, 54, 51, 48, 52, 52, 48, 48,
53, 48, 48, 97, 99, 99, 101, 112, 116, 45, 99, 104, 97, 114, 115,
101, 116, 103, 122, 105, 112, 44, 32, 100, 101, 102, 108, 97, 116, 101,
97, 99, 99, 101, 112, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101,
97, 99, 99, 101, 112, 116, 45, 114, 97, 110, 103, 101, 115, 97, 99,
99, 101, 112, 116, 97, 99, 99, 101, 115, 115, 45, 99, 111, 110, 116,
114, 111, 108, 45, 97, 108, 108, 111, 119, 45, 111, 114, 105, 103, 105,
110, 97, 103, 101, 97, 108, 108, 111, 119, 97, 117, 116, 104, 111, 114,
105, 122, 97, 116, 105, 111, 110, 99, 97, 99, 104, 101, 45, 99, 111,
110, 116, 114, 111, 108, 99, 111, 110, 116, 101, 110, 116, 45, 100, 105,
115, 112, 111, 115, 105, 116, 105, 111, 110, 99, 111, 110, 116, 101, 110,
116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 99, 111, 110, 116, 101,
110, 116, 45, 108, 101, 110, 103, 116, 104, 99, 111, 110, 116, 101, 110,
116, 45, 108, 111, 99, 97, 116, 105, 111, 110, 99, 111, 110, 116, 101,
110, 116, 45, 114, 97, 110, 103, 101, 99, 111, 111, 107, 105, 101, 100,
97, 116, 101, 101, 116, 97, 103, 101, 120, 112, 101, 99, 116, 101, 120,
112, 105, 114, 101, 115, 102, 114, 111, 109, 105, 102, 45, 109, 97, 116,
99, 104, 105, 102, 45, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115,
105, 110, 99, 101, 105, 102, 45, 110, 111, 110, 101, 45, 109, 97, 116,
99, 104, 105, 102, 45, 114, 97, 110, 103, 101, 105, 102, 45, 117, 110,
109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105, 110, 99, 101, 108,
97, 115, 116, 45, 109, 111, 100, 105, 102, 105, 101, 100, 108, 98, 45,
99, 111, 115, 116, 45, 98, 105, 110, 108, 105, 110, 107, 108, 111, 99,
97, 116, 105, 111, 110, 109, 97, 120, 45, 102, 111, 114, 119, 97, 114,
100, 115, 112, 114, 111, 120, 121, 45, 97, 117, 116, 104, 101, 110, 116,
105, 99, 97, 116, 101, 112, 114, 111, 120, 121, 45, 97, 117, 116, 104,
111, 114, 105, 122, 97, 116, 105, 111, 110, 114, 97, 110, 103, 101, 114,
101, 102, 101, 114, 101, 114, 114, 101, 102, 114, 101, 115, 104, 114, 101,
116, 114, 121, 45, 97, 102, 116, 101, 114, 115, 101, 114, 118, 101, 114,
115, 101, 116, 45, 99, 111, 111, 107, 105, 101, 115, 116, 114, 105, 99,
116, 45, 116, 114, 97, 110, 115, 112, 111, 114, 116, 45, 115, 101, 99,
117, 114, 105, 116, 121, 116, 114, 97, 110, 115, 102, 101, 114, 45, 101,
110, 99, 111, 100, 105, 110, 103, 118, 97, 114, 121, 118, 105, 97, 119,
119, 119, 45, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101,
105, 100, 101, 110, 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116,
101, 105, 100, 101, 110, 116, 105, 116, 121, 44, 103, 122, 105, 112, 100,
101, 102, 108, 97, 116, 101, 44, 103, 122, 105, 112, 105, 100, 101, 110,
116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122,
105, 112};
static void static_ref(void* unused) {}
static void static_unref(void* unused) {}
@ -216,8 +215,6 @@ grpc_slice_refcount grpc_static_metadata_refcounts[GRPC_STATIC_MDSTR_COUNT] = {
{&grpc_static_metadata_vtable, &static_sub_refcnt},
{&grpc_static_metadata_vtable, &static_sub_refcnt},
{&grpc_static_metadata_vtable, &static_sub_refcnt},
{&grpc_static_metadata_vtable, &static_sub_refcnt},
{&grpc_static_metadata_vtable, &static_sub_refcnt},
};
const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT] = {
@ -250,80 +247,78 @@ const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT] = {
{&grpc_static_metadata_refcounts[26], {{g_bytes + 333, 30}}},
{&grpc_static_metadata_refcounts[27], {{g_bytes + 363, 31}}},
{&grpc_static_metadata_refcounts[28], {{g_bytes + 394, 36}}},
{&grpc_static_metadata_refcounts[29], {{g_bytes + 430, 15}}},
{&grpc_static_metadata_refcounts[30], {{g_bytes + 445, 12}}},
{&grpc_static_metadata_refcounts[31], {{g_bytes + 457, 11}}},
{&grpc_static_metadata_refcounts[32], {{g_bytes + 468, 1}}},
{&grpc_static_metadata_refcounts[33], {{g_bytes + 469, 1}}},
{&grpc_static_metadata_refcounts[34], {{g_bytes + 470, 1}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 471, 8}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 479, 4}}},
{&grpc_static_metadata_refcounts[37], {{g_bytes + 483, 7}}},
{&grpc_static_metadata_refcounts[38], {{g_bytes + 490, 8}}},
{&grpc_static_metadata_refcounts[39], {{g_bytes + 498, 16}}},
{&grpc_static_metadata_refcounts[40], {{g_bytes + 514, 4}}},
{&grpc_static_metadata_refcounts[41], {{g_bytes + 518, 3}}},
{&grpc_static_metadata_refcounts[42], {{g_bytes + 521, 3}}},
{&grpc_static_metadata_refcounts[43], {{g_bytes + 524, 4}}},
{&grpc_static_metadata_refcounts[44], {{g_bytes + 528, 5}}},
{&grpc_static_metadata_refcounts[45], {{g_bytes + 533, 4}}},
{&grpc_static_metadata_refcounts[46], {{g_bytes + 537, 3}}},
{&grpc_static_metadata_refcounts[47], {{g_bytes + 540, 3}}},
{&grpc_static_metadata_refcounts[48], {{g_bytes + 543, 1}}},
{&grpc_static_metadata_refcounts[49], {{g_bytes + 544, 11}}},
{&grpc_static_metadata_refcounts[50], {{g_bytes + 555, 3}}},
{&grpc_static_metadata_refcounts[51], {{g_bytes + 558, 3}}},
{&grpc_static_metadata_refcounts[52], {{g_bytes + 561, 3}}},
{&grpc_static_metadata_refcounts[53], {{g_bytes + 564, 3}}},
{&grpc_static_metadata_refcounts[54], {{g_bytes + 567, 3}}},
{&grpc_static_metadata_refcounts[55], {{g_bytes + 570, 14}}},
{&grpc_static_metadata_refcounts[56], {{g_bytes + 584, 13}}},
{&grpc_static_metadata_refcounts[57], {{g_bytes + 597, 15}}},
{&grpc_static_metadata_refcounts[58], {{g_bytes + 612, 13}}},
{&grpc_static_metadata_refcounts[59], {{g_bytes + 625, 6}}},
{&grpc_static_metadata_refcounts[60], {{g_bytes + 631, 27}}},
{&grpc_static_metadata_refcounts[61], {{g_bytes + 658, 3}}},
{&grpc_static_metadata_refcounts[62], {{g_bytes + 661, 5}}},
{&grpc_static_metadata_refcounts[63], {{g_bytes + 666, 13}}},
{&grpc_static_metadata_refcounts[64], {{g_bytes + 679, 13}}},
{&grpc_static_metadata_refcounts[65], {{g_bytes + 692, 19}}},
{&grpc_static_metadata_refcounts[66], {{g_bytes + 711, 16}}},
{&grpc_static_metadata_refcounts[67], {{g_bytes + 727, 14}}},
{&grpc_static_metadata_refcounts[68], {{g_bytes + 741, 16}}},
{&grpc_static_metadata_refcounts[69], {{g_bytes + 757, 13}}},
{&grpc_static_metadata_refcounts[70], {{g_bytes + 770, 6}}},
{&grpc_static_metadata_refcounts[71], {{g_bytes + 776, 4}}},
{&grpc_static_metadata_refcounts[72], {{g_bytes + 780, 4}}},
{&grpc_static_metadata_refcounts[73], {{g_bytes + 784, 6}}},
{&grpc_static_metadata_refcounts[74], {{g_bytes + 790, 7}}},
{&grpc_static_metadata_refcounts[75], {{g_bytes + 797, 4}}},
{&grpc_static_metadata_refcounts[76], {{g_bytes + 801, 8}}},
{&grpc_static_metadata_refcounts[77], {{g_bytes + 809, 17}}},
{&grpc_static_metadata_refcounts[78], {{g_bytes + 826, 13}}},
{&grpc_static_metadata_refcounts[79], {{g_bytes + 839, 8}}},
{&grpc_static_metadata_refcounts[80], {{g_bytes + 847, 19}}},
{&grpc_static_metadata_refcounts[81], {{g_bytes + 866, 13}}},
{&grpc_static_metadata_refcounts[82], {{g_bytes + 879, 11}}},
{&grpc_static_metadata_refcounts[83], {{g_bytes + 890, 4}}},
{&grpc_static_metadata_refcounts[84], {{g_bytes + 894, 8}}},
{&grpc_static_metadata_refcounts[85], {{g_bytes + 902, 12}}},
{&grpc_static_metadata_refcounts[86], {{g_bytes + 914, 18}}},
{&grpc_static_metadata_refcounts[87], {{g_bytes + 932, 19}}},
{&grpc_static_metadata_refcounts[88], {{g_bytes + 951, 5}}},
{&grpc_static_metadata_refcounts[89], {{g_bytes + 956, 7}}},
{&grpc_static_metadata_refcounts[90], {{g_bytes + 963, 7}}},
{&grpc_static_metadata_refcounts[91], {{g_bytes + 970, 11}}},
{&grpc_static_metadata_refcounts[92], {{g_bytes + 981, 6}}},
{&grpc_static_metadata_refcounts[93], {{g_bytes + 987, 10}}},
{&grpc_static_metadata_refcounts[94], {{g_bytes + 997, 25}}},
{&grpc_static_metadata_refcounts[95], {{g_bytes + 1022, 17}}},
{&grpc_static_metadata_refcounts[96], {{g_bytes + 1039, 4}}},
{&grpc_static_metadata_refcounts[97], {{g_bytes + 1043, 3}}},
{&grpc_static_metadata_refcounts[98], {{g_bytes + 1046, 16}}},
{&grpc_static_metadata_refcounts[99], {{g_bytes + 1062, 16}}},
{&grpc_static_metadata_refcounts[100], {{g_bytes + 1078, 13}}},
{&grpc_static_metadata_refcounts[101], {{g_bytes + 1091, 12}}},
{&grpc_static_metadata_refcounts[102], {{g_bytes + 1103, 21}}},
{&grpc_static_metadata_refcounts[29], {{g_bytes + 430, 7}}},
{&grpc_static_metadata_refcounts[30], {{g_bytes + 437, 4}}},
{&grpc_static_metadata_refcounts[31], {{g_bytes + 441, 11}}},
{&grpc_static_metadata_refcounts[32], {{g_bytes + 452, 1}}},
{&grpc_static_metadata_refcounts[33], {{g_bytes + 453, 1}}},
{&grpc_static_metadata_refcounts[34], {{g_bytes + 454, 1}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 455, 8}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 463, 8}}},
{&grpc_static_metadata_refcounts[37], {{g_bytes + 471, 16}}},
{&grpc_static_metadata_refcounts[38], {{g_bytes + 487, 4}}},
{&grpc_static_metadata_refcounts[39], {{g_bytes + 491, 3}}},
{&grpc_static_metadata_refcounts[40], {{g_bytes + 494, 3}}},
{&grpc_static_metadata_refcounts[41], {{g_bytes + 497, 4}}},
{&grpc_static_metadata_refcounts[42], {{g_bytes + 501, 5}}},
{&grpc_static_metadata_refcounts[43], {{g_bytes + 506, 4}}},
{&grpc_static_metadata_refcounts[44], {{g_bytes + 510, 3}}},
{&grpc_static_metadata_refcounts[45], {{g_bytes + 513, 3}}},
{&grpc_static_metadata_refcounts[46], {{g_bytes + 516, 1}}},
{&grpc_static_metadata_refcounts[47], {{g_bytes + 517, 11}}},
{&grpc_static_metadata_refcounts[48], {{g_bytes + 528, 3}}},
{&grpc_static_metadata_refcounts[49], {{g_bytes + 531, 3}}},
{&grpc_static_metadata_refcounts[50], {{g_bytes + 534, 3}}},
{&grpc_static_metadata_refcounts[51], {{g_bytes + 537, 3}}},
{&grpc_static_metadata_refcounts[52], {{g_bytes + 540, 3}}},
{&grpc_static_metadata_refcounts[53], {{g_bytes + 543, 14}}},
{&grpc_static_metadata_refcounts[54], {{g_bytes + 557, 13}}},
{&grpc_static_metadata_refcounts[55], {{g_bytes + 570, 15}}},
{&grpc_static_metadata_refcounts[56], {{g_bytes + 585, 13}}},
{&grpc_static_metadata_refcounts[57], {{g_bytes + 598, 6}}},
{&grpc_static_metadata_refcounts[58], {{g_bytes + 604, 27}}},
{&grpc_static_metadata_refcounts[59], {{g_bytes + 631, 3}}},
{&grpc_static_metadata_refcounts[60], {{g_bytes + 634, 5}}},
{&grpc_static_metadata_refcounts[61], {{g_bytes + 639, 13}}},
{&grpc_static_metadata_refcounts[62], {{g_bytes + 652, 13}}},
{&grpc_static_metadata_refcounts[63], {{g_bytes + 665, 19}}},
{&grpc_static_metadata_refcounts[64], {{g_bytes + 684, 16}}},
{&grpc_static_metadata_refcounts[65], {{g_bytes + 700, 14}}},
{&grpc_static_metadata_refcounts[66], {{g_bytes + 714, 16}}},
{&grpc_static_metadata_refcounts[67], {{g_bytes + 730, 13}}},
{&grpc_static_metadata_refcounts[68], {{g_bytes + 743, 6}}},
{&grpc_static_metadata_refcounts[69], {{g_bytes + 749, 4}}},
{&grpc_static_metadata_refcounts[70], {{g_bytes + 753, 4}}},
{&grpc_static_metadata_refcounts[71], {{g_bytes + 757, 6}}},
{&grpc_static_metadata_refcounts[72], {{g_bytes + 763, 7}}},
{&grpc_static_metadata_refcounts[73], {{g_bytes + 770, 4}}},
{&grpc_static_metadata_refcounts[74], {{g_bytes + 774, 8}}},
{&grpc_static_metadata_refcounts[75], {{g_bytes + 782, 17}}},
{&grpc_static_metadata_refcounts[76], {{g_bytes + 799, 13}}},
{&grpc_static_metadata_refcounts[77], {{g_bytes + 812, 8}}},
{&grpc_static_metadata_refcounts[78], {{g_bytes + 820, 19}}},
{&grpc_static_metadata_refcounts[79], {{g_bytes + 839, 13}}},
{&grpc_static_metadata_refcounts[80], {{g_bytes + 852, 11}}},
{&grpc_static_metadata_refcounts[81], {{g_bytes + 863, 4}}},
{&grpc_static_metadata_refcounts[82], {{g_bytes + 867, 8}}},
{&grpc_static_metadata_refcounts[83], {{g_bytes + 875, 12}}},
{&grpc_static_metadata_refcounts[84], {{g_bytes + 887, 18}}},
{&grpc_static_metadata_refcounts[85], {{g_bytes + 905, 19}}},
{&grpc_static_metadata_refcounts[86], {{g_bytes + 924, 5}}},
{&grpc_static_metadata_refcounts[87], {{g_bytes + 929, 7}}},
{&grpc_static_metadata_refcounts[88], {{g_bytes + 936, 7}}},
{&grpc_static_metadata_refcounts[89], {{g_bytes + 943, 11}}},
{&grpc_static_metadata_refcounts[90], {{g_bytes + 954, 6}}},
{&grpc_static_metadata_refcounts[91], {{g_bytes + 960, 10}}},
{&grpc_static_metadata_refcounts[92], {{g_bytes + 970, 25}}},
{&grpc_static_metadata_refcounts[93], {{g_bytes + 995, 17}}},
{&grpc_static_metadata_refcounts[94], {{g_bytes + 1012, 4}}},
{&grpc_static_metadata_refcounts[95], {{g_bytes + 1016, 3}}},
{&grpc_static_metadata_refcounts[96], {{g_bytes + 1019, 16}}},
{&grpc_static_metadata_refcounts[97], {{g_bytes + 1035, 16}}},
{&grpc_static_metadata_refcounts[98], {{g_bytes + 1051, 13}}},
{&grpc_static_metadata_refcounts[99], {{g_bytes + 1064, 12}}},
{&grpc_static_metadata_refcounts[100], {{g_bytes + 1076, 21}}},
};
uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = {
@ -333,16 +328,16 @@ uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 6, 6, 8, 8, 2, 4, 4};
static const int8_t elems_r[] = {
11, 9, -3, 0, 10, 25, -77, 26, 0, 11, -7, 0, 0, 0, 21, 14, 1,
0, 0, 33, 12, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, -56, 0, -36, -61, -60, -39, -63, -64, 0, 36, 35, 34, 33,
34, 33, 32, 31, 31, 30, 29, 28, 27, 26, 26, 25, 25, 24, 23, 22, 21,
20, 19, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 12, 11, 0};
13, 2, 1, 0, 15, 4, 0, 21, 0, 23, -3, 0, 0, 0, 10, 19, -4,
0, 0, 1, 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, -52, 0, -55, -36, -57, -58, -58, -58, 0, 40, 39, 38, 37, 36, 35,
34, 33, 32, 31, 30, 29, 28, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19,
18, 17, 16, 15, 18, 17, 16, 15, 14, 13, 12, 11, 11, 0};
static uint32_t elems_phash(uint32_t i) {
i -= 48;
uint32_t x = i % 101;
uint32_t y = i / 101;
i -= 46;
uint32_t x = i % 99;
uint32_t y = i / 99;
uint32_t h = x;
if (y < GPR_ARRAY_SIZE(elems_r)) {
uint32_t delta = (uint32_t)elems_r[y];
@ -352,31 +347,31 @@ static uint32_t elems_phash(uint32_t i) {
}
static const uint16_t elem_keys[] = {
1065, 1066, 1067, 256, 257, 258, 259, 260, 1671, 149, 150, 48,
49, 455, 456, 457, 962, 963, 964, 1568, 1683, 1684, 753, 754,
1465, 553, 755, 2083, 2186, 5688, 5997, 1580, 1581, 6100, 6306, 6409,
6512, 6615, 6718, 6821, 1481, 1704, 6924, 7027, 7130, 7233, 1980, 7336,
7439, 7542, 7645, 7748, 7851, 5894, 7954, 8057, 6203, 8160, 8263, 8366,
8469, 8572, 8675, 8778, 1129, 1130, 1131, 1132, 8881, 8984, 9087, 9190,
9293, 9396, 9499, 9602, 9705, 9808, 9911, 332, 10014, 10117, 0, 0,
0, 1748, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 247,
248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0};
1039, 1040, 145, 146, 541, 1639, 1045, 250, 251, 252, 253, 254,
1646, 46, 47, 1437, 1942, 1651, 445, 446, 447, 739, 740, 741,
938, 939, 1538, 2043, 2144, 1451, 944, 5376, 5578, 1545, 5780, 5881,
1670, 5982, 1550, 6083, 6184, 6285, 6386, 6487, 6588, 6689, 6790, 6891,
6992, 7093, 7194, 7295, 7396, 5679, 7497, 7598, 7699, 7800, 7901, 8002,
8103, 8204, 8305, 8406, 8507, 8608, 8709, 8810, 1107, 1108, 1109, 1110,
8911, 9012, 9113, 9214, 9315, 9416, 9517, 9618, 1714, 9719, 0, 326,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 241, 242, 0, 0, 0, 0, 0, 0, 139, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0};
static const uint8_t elem_idxs[] = {
76, 79, 77, 19, 20, 21, 22, 23, 25, 15, 16, 17, 18, 11,
12, 13, 3, 4, 5, 38, 83, 84, 0, 1, 43, 6, 2, 50,
57, 24, 28, 36, 37, 29, 31, 32, 33, 34, 35, 39, 7, 26,
40, 41, 42, 44, 72, 45, 46, 47, 48, 49, 51, 27, 52, 53,
30, 54, 55, 56, 58, 59, 60, 61, 78, 80, 81, 82, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 73, 14, 74, 75, 255, 255,
255, 85, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 8, 9, 10};
77, 79, 15, 16, 6, 25, 76, 19, 20, 21, 22, 23, 84, 17,
18, 43, 72, 83, 11, 12, 13, 0, 1, 2, 5, 4, 38, 50,
57, 7, 3, 24, 27, 37, 29, 30, 26, 31, 36, 32, 33, 34,
35, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 28, 51, 52,
53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 78, 80,
81, 82, 66, 67, 68, 69, 70, 71, 73, 74, 85, 75, 255, 14,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
9, 10, 255, 255, 255, 255, 255, 255, 8};
grpc_mdelem grpc_static_mdelem_for_static_strings(int a, int b) {
if (a == -1 || b == -1) return GRPC_MDNULL;
uint32_t k = (uint32_t)(a * 103 + b);
uint32_t k = (uint32_t)(a * 101 + b);
uint32_t h = elems_phash(k);
return h < GPR_ARRAY_SIZE(elem_keys) && elem_keys[h] == k &&
elem_idxs[h] != 255
@ -387,177 +382,177 @@ grpc_mdelem grpc_static_mdelem_for_static_strings(int a, int b) {
grpc_mdelem_data grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = {
{{&grpc_static_metadata_refcounts[7], {{g_bytes + 50, 11}}},
{&grpc_static_metadata_refcounts[32], {{g_bytes + 468, 1}}}},
{&grpc_static_metadata_refcounts[32], {{g_bytes + 452, 1}}}},
{{&grpc_static_metadata_refcounts[7], {{g_bytes + 50, 11}}},
{&grpc_static_metadata_refcounts[33], {{g_bytes + 469, 1}}}},
{&grpc_static_metadata_refcounts[33], {{g_bytes + 453, 1}}}},
{{&grpc_static_metadata_refcounts[7], {{g_bytes + 50, 11}}},
{&grpc_static_metadata_refcounts[34], {{g_bytes + 470, 1}}}},
{&grpc_static_metadata_refcounts[34], {{g_bytes + 454, 1}}}},
{{&grpc_static_metadata_refcounts[9], {{g_bytes + 77, 13}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 471, 8}}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 455, 8}}}},
{{&grpc_static_metadata_refcounts[9], {{g_bytes + 77, 13}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 479, 4}}}},
{&grpc_static_metadata_refcounts[30], {{g_bytes + 437, 4}}}},
{{&grpc_static_metadata_refcounts[9], {{g_bytes + 77, 13}}},
{&grpc_static_metadata_refcounts[37], {{g_bytes + 483, 7}}}},
{&grpc_static_metadata_refcounts[29], {{g_bytes + 430, 7}}}},
{{&grpc_static_metadata_refcounts[5], {{g_bytes + 36, 2}}},
{&grpc_static_metadata_refcounts[38], {{g_bytes + 490, 8}}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 463, 8}}}},
{{&grpc_static_metadata_refcounts[14], {{g_bytes + 158, 12}}},
{&grpc_static_metadata_refcounts[39], {{g_bytes + 498, 16}}}},
{&grpc_static_metadata_refcounts[37], {{g_bytes + 471, 16}}}},
{{&grpc_static_metadata_refcounts[1], {{g_bytes + 5, 7}}},
{&grpc_static_metadata_refcounts[40], {{g_bytes + 514, 4}}}},
{&grpc_static_metadata_refcounts[38], {{g_bytes + 487, 4}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[41], {{g_bytes + 518, 3}}}},
{&grpc_static_metadata_refcounts[39], {{g_bytes + 491, 3}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[42], {{g_bytes + 521, 3}}}},
{&grpc_static_metadata_refcounts[40], {{g_bytes + 494, 3}}}},
{{&grpc_static_metadata_refcounts[4], {{g_bytes + 29, 7}}},
{&grpc_static_metadata_refcounts[43], {{g_bytes + 524, 4}}}},
{&grpc_static_metadata_refcounts[41], {{g_bytes + 497, 4}}}},
{{&grpc_static_metadata_refcounts[4], {{g_bytes + 29, 7}}},
{&grpc_static_metadata_refcounts[44], {{g_bytes + 528, 5}}}},
{&grpc_static_metadata_refcounts[42], {{g_bytes + 501, 5}}}},
{{&grpc_static_metadata_refcounts[4], {{g_bytes + 29, 7}}},
{&grpc_static_metadata_refcounts[45], {{g_bytes + 533, 4}}}},
{&grpc_static_metadata_refcounts[43], {{g_bytes + 506, 4}}}},
{{&grpc_static_metadata_refcounts[3], {{g_bytes + 19, 10}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[1], {{g_bytes + 5, 7}}},
{&grpc_static_metadata_refcounts[46], {{g_bytes + 537, 3}}}},
{&grpc_static_metadata_refcounts[44], {{g_bytes + 510, 3}}}},
{{&grpc_static_metadata_refcounts[1], {{g_bytes + 5, 7}}},
{&grpc_static_metadata_refcounts[47], {{g_bytes + 540, 3}}}},
{&grpc_static_metadata_refcounts[45], {{g_bytes + 513, 3}}}},
{{&grpc_static_metadata_refcounts[0], {{g_bytes + 0, 5}}},
{&grpc_static_metadata_refcounts[48], {{g_bytes + 543, 1}}}},
{&grpc_static_metadata_refcounts[46], {{g_bytes + 516, 1}}}},
{{&grpc_static_metadata_refcounts[0], {{g_bytes + 0, 5}}},
{&grpc_static_metadata_refcounts[49], {{g_bytes + 544, 11}}}},
{&grpc_static_metadata_refcounts[47], {{g_bytes + 517, 11}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[50], {{g_bytes + 555, 3}}}},
{&grpc_static_metadata_refcounts[48], {{g_bytes + 528, 3}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[51], {{g_bytes + 558, 3}}}},
{&grpc_static_metadata_refcounts[49], {{g_bytes + 531, 3}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[52], {{g_bytes + 561, 3}}}},
{&grpc_static_metadata_refcounts[50], {{g_bytes + 534, 3}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[53], {{g_bytes + 564, 3}}}},
{&grpc_static_metadata_refcounts[51], {{g_bytes + 537, 3}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[54], {{g_bytes + 567, 3}}}},
{{&grpc_static_metadata_refcounts[55], {{g_bytes + 570, 14}}},
{&grpc_static_metadata_refcounts[52], {{g_bytes + 540, 3}}}},
{{&grpc_static_metadata_refcounts[53], {{g_bytes + 543, 14}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}},
{&grpc_static_metadata_refcounts[56], {{g_bytes + 584, 13}}}},
{{&grpc_static_metadata_refcounts[57], {{g_bytes + 597, 15}}},
{&grpc_static_metadata_refcounts[54], {{g_bytes + 557, 13}}}},
{{&grpc_static_metadata_refcounts[55], {{g_bytes + 570, 15}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[58], {{g_bytes + 612, 13}}},
{{&grpc_static_metadata_refcounts[56], {{g_bytes + 585, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[59], {{g_bytes + 625, 6}}},
{{&grpc_static_metadata_refcounts[57], {{g_bytes + 598, 6}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[60], {{g_bytes + 631, 27}}},
{{&grpc_static_metadata_refcounts[58], {{g_bytes + 604, 27}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[61], {{g_bytes + 658, 3}}},
{{&grpc_static_metadata_refcounts[59], {{g_bytes + 631, 3}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[62], {{g_bytes + 661, 5}}},
{{&grpc_static_metadata_refcounts[60], {{g_bytes + 634, 5}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[63], {{g_bytes + 666, 13}}},
{{&grpc_static_metadata_refcounts[61], {{g_bytes + 639, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[64], {{g_bytes + 679, 13}}},
{{&grpc_static_metadata_refcounts[62], {{g_bytes + 652, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[65], {{g_bytes + 692, 19}}},
{{&grpc_static_metadata_refcounts[63], {{g_bytes + 665, 19}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[15], {{g_bytes + 170, 16}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 471, 8}}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 455, 8}}}},
{{&grpc_static_metadata_refcounts[15], {{g_bytes + 170, 16}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 479, 4}}}},
{&grpc_static_metadata_refcounts[30], {{g_bytes + 437, 4}}}},
{{&grpc_static_metadata_refcounts[15], {{g_bytes + 170, 16}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[66], {{g_bytes + 711, 16}}},
{{&grpc_static_metadata_refcounts[64], {{g_bytes + 684, 16}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[67], {{g_bytes + 727, 14}}},
{{&grpc_static_metadata_refcounts[65], {{g_bytes + 700, 14}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[68], {{g_bytes + 741, 16}}},
{{&grpc_static_metadata_refcounts[66], {{g_bytes + 714, 16}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[69], {{g_bytes + 757, 13}}},
{{&grpc_static_metadata_refcounts[67], {{g_bytes + 730, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[14], {{g_bytes + 158, 12}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[70], {{g_bytes + 770, 6}}},
{{&grpc_static_metadata_refcounts[68], {{g_bytes + 743, 6}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[71], {{g_bytes + 776, 4}}},
{{&grpc_static_metadata_refcounts[69], {{g_bytes + 749, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[72], {{g_bytes + 780, 4}}},
{{&grpc_static_metadata_refcounts[70], {{g_bytes + 753, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[73], {{g_bytes + 784, 6}}},
{{&grpc_static_metadata_refcounts[71], {{g_bytes + 757, 6}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[74], {{g_bytes + 790, 7}}},
{{&grpc_static_metadata_refcounts[72], {{g_bytes + 763, 7}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[75], {{g_bytes + 797, 4}}},
{{&grpc_static_metadata_refcounts[73], {{g_bytes + 770, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[20], {{g_bytes + 278, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[76], {{g_bytes + 801, 8}}},
{{&grpc_static_metadata_refcounts[74], {{g_bytes + 774, 8}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[77], {{g_bytes + 809, 17}}},
{{&grpc_static_metadata_refcounts[75], {{g_bytes + 782, 17}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[78], {{g_bytes + 826, 13}}},
{{&grpc_static_metadata_refcounts[76], {{g_bytes + 799, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[79], {{g_bytes + 839, 8}}},
{{&grpc_static_metadata_refcounts[77], {{g_bytes + 812, 8}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[80], {{g_bytes + 847, 19}}},
{{&grpc_static_metadata_refcounts[78], {{g_bytes + 820, 19}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[81], {{g_bytes + 866, 13}}},
{{&grpc_static_metadata_refcounts[79], {{g_bytes + 839, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[21], {{g_bytes + 282, 8}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[82], {{g_bytes + 879, 11}}},
{{&grpc_static_metadata_refcounts[80], {{g_bytes + 852, 11}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[83], {{g_bytes + 890, 4}}},
{{&grpc_static_metadata_refcounts[81], {{g_bytes + 863, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[84], {{g_bytes + 894, 8}}},
{{&grpc_static_metadata_refcounts[82], {{g_bytes + 867, 8}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[85], {{g_bytes + 902, 12}}},
{{&grpc_static_metadata_refcounts[83], {{g_bytes + 875, 12}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[86], {{g_bytes + 914, 18}}},
{{&grpc_static_metadata_refcounts[84], {{g_bytes + 887, 18}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[87], {{g_bytes + 932, 19}}},
{{&grpc_static_metadata_refcounts[85], {{g_bytes + 905, 19}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[88], {{g_bytes + 951, 5}}},
{{&grpc_static_metadata_refcounts[86], {{g_bytes + 924, 5}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[89], {{g_bytes + 956, 7}}},
{{&grpc_static_metadata_refcounts[87], {{g_bytes + 929, 7}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[90], {{g_bytes + 963, 7}}},
{{&grpc_static_metadata_refcounts[88], {{g_bytes + 936, 7}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[91], {{g_bytes + 970, 11}}},
{{&grpc_static_metadata_refcounts[89], {{g_bytes + 943, 11}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[92], {{g_bytes + 981, 6}}},
{{&grpc_static_metadata_refcounts[90], {{g_bytes + 954, 6}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[93], {{g_bytes + 987, 10}}},
{{&grpc_static_metadata_refcounts[91], {{g_bytes + 960, 10}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[94], {{g_bytes + 997, 25}}},
{{&grpc_static_metadata_refcounts[92], {{g_bytes + 970, 25}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[95], {{g_bytes + 1022, 17}}},
{{&grpc_static_metadata_refcounts[93], {{g_bytes + 995, 17}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[19], {{g_bytes + 268, 10}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[96], {{g_bytes + 1039, 4}}},
{{&grpc_static_metadata_refcounts[94], {{g_bytes + 1012, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[97], {{g_bytes + 1043, 3}}},
{{&grpc_static_metadata_refcounts[95], {{g_bytes + 1016, 3}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[98], {{g_bytes + 1046, 16}}},
{{&grpc_static_metadata_refcounts[96], {{g_bytes + 1019, 16}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 471, 8}}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 455, 8}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[37], {{g_bytes + 483, 7}}}},
{&grpc_static_metadata_refcounts[29], {{g_bytes + 430, 7}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[99], {{g_bytes + 1062, 16}}}},
{&grpc_static_metadata_refcounts[97], {{g_bytes + 1035, 16}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 479, 4}}}},
{&grpc_static_metadata_refcounts[30], {{g_bytes + 437, 4}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[100], {{g_bytes + 1078, 13}}}},
{&grpc_static_metadata_refcounts[98], {{g_bytes + 1051, 13}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[101], {{g_bytes + 1091, 12}}}},
{&grpc_static_metadata_refcounts[99], {{g_bytes + 1064, 12}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[102], {{g_bytes + 1103, 21}}}},
{&grpc_static_metadata_refcounts[100], {{g_bytes + 1076, 21}}}},
{{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 471, 8}}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 455, 8}}}},
{{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 479, 4}}}},
{&grpc_static_metadata_refcounts[30], {{g_bytes + 437, 4}}}},
{{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}},
{&grpc_static_metadata_refcounts[100], {{g_bytes + 1078, 13}}}},
{&grpc_static_metadata_refcounts[98], {{g_bytes + 1051, 13}}}},
};
bool grpc_static_callout_is_default[GRPC_BATCH_CALLOUTS_COUNT] = {
true, // :path

@ -20,7 +20,7 @@
* To make changes to this file, change
* tools/codegen/core/gen_static_metadata.py, and then re-run it.
*
* See metadata.h for an explanation of the interface here, and metadata.c for
* See metadata.h for an explanation of the interface here, and metadata.cc for
* an explanation of what's going on.
*/
@ -29,7 +29,7 @@
#include "src/core/lib/transport/metadata.h"
#define GRPC_STATIC_MDSTR_COUNT 103
#define GRPC_STATIC_MDSTR_COUNT 101
extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT];
/* ":path" */
#define GRPC_MDSTR_PATH (grpc_static_slice_table[0])
@ -93,10 +93,10 @@ extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT];
/* "/grpc.lb.v1.LoadBalancer/BalanceLoad" */
#define GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD \
(grpc_static_slice_table[28])
/* "message/deflate" */
#define GRPC_MDSTR_MESSAGE_SLASH_DEFLATE (grpc_static_slice_table[29])
/* "message/gzip" */
#define GRPC_MDSTR_MESSAGE_SLASH_GZIP (grpc_static_slice_table[30])
/* "deflate" */
#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table[29])
/* "gzip" */
#define GRPC_MDSTR_GZIP (grpc_static_slice_table[30])
/* "stream/gzip" */
#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table[31])
/* "0" */
@ -107,141 +107,137 @@ extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT];
#define GRPC_MDSTR_2 (grpc_static_slice_table[34])
/* "identity" */
#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table[35])
/* "gzip" */
#define GRPC_MDSTR_GZIP (grpc_static_slice_table[36])
/* "deflate" */
#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table[37])
/* "trailers" */
#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[38])
#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[36])
/* "application/grpc" */
#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table[39])
#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table[37])
/* "POST" */
#define GRPC_MDSTR_POST (grpc_static_slice_table[40])
#define GRPC_MDSTR_POST (grpc_static_slice_table[38])
/* "200" */
#define GRPC_MDSTR_200 (grpc_static_slice_table[41])
#define GRPC_MDSTR_200 (grpc_static_slice_table[39])
/* "404" */
#define GRPC_MDSTR_404 (grpc_static_slice_table[42])
#define GRPC_MDSTR_404 (grpc_static_slice_table[40])
/* "http" */
#define GRPC_MDSTR_HTTP (grpc_static_slice_table[43])
#define GRPC_MDSTR_HTTP (grpc_static_slice_table[41])
/* "https" */
#define GRPC_MDSTR_HTTPS (grpc_static_slice_table[44])
#define GRPC_MDSTR_HTTPS (grpc_static_slice_table[42])
/* "grpc" */
#define GRPC_MDSTR_GRPC (grpc_static_slice_table[45])
#define GRPC_MDSTR_GRPC (grpc_static_slice_table[43])
/* "GET" */
#define GRPC_MDSTR_GET (grpc_static_slice_table[46])
#define GRPC_MDSTR_GET (grpc_static_slice_table[44])
/* "PUT" */
#define GRPC_MDSTR_PUT (grpc_static_slice_table[47])
#define GRPC_MDSTR_PUT (grpc_static_slice_table[45])
/* "/" */
#define GRPC_MDSTR_SLASH (grpc_static_slice_table[48])
#define GRPC_MDSTR_SLASH (grpc_static_slice_table[46])
/* "/index.html" */
#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[49])
#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[47])
/* "204" */
#define GRPC_MDSTR_204 (grpc_static_slice_table[50])
#define GRPC_MDSTR_204 (grpc_static_slice_table[48])
/* "206" */
#define GRPC_MDSTR_206 (grpc_static_slice_table[51])
#define GRPC_MDSTR_206 (grpc_static_slice_table[49])
/* "304" */
#define GRPC_MDSTR_304 (grpc_static_slice_table[52])
#define GRPC_MDSTR_304 (grpc_static_slice_table[50])
/* "400" */
#define GRPC_MDSTR_400 (grpc_static_slice_table[53])
#define GRPC_MDSTR_400 (grpc_static_slice_table[51])
/* "500" */
#define GRPC_MDSTR_500 (grpc_static_slice_table[54])
#define GRPC_MDSTR_500 (grpc_static_slice_table[52])
/* "accept-charset" */
#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table[55])
#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table[53])
/* "gzip, deflate" */
#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table[56])
#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table[54])
/* "accept-language" */
#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table[57])
#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table[55])
/* "accept-ranges" */
#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table[58])
#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table[56])
/* "accept" */
#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table[59])
#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table[57])
/* "access-control-allow-origin" */
#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table[60])
#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table[58])
/* "age" */
#define GRPC_MDSTR_AGE (grpc_static_slice_table[61])
#define GRPC_MDSTR_AGE (grpc_static_slice_table[59])
/* "allow" */
#define GRPC_MDSTR_ALLOW (grpc_static_slice_table[62])
#define GRPC_MDSTR_ALLOW (grpc_static_slice_table[60])
/* "authorization" */
#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table[63])
#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table[61])
/* "cache-control" */
#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table[64])
#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table[62])
/* "content-disposition" */
#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table[65])
#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table[63])
/* "content-language" */
#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table[66])
#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table[64])
/* "content-length" */
#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table[67])
#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table[65])
/* "content-location" */
#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table[68])
#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table[66])
/* "content-range" */
#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table[69])
#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table[67])
/* "cookie" */
#define GRPC_MDSTR_COOKIE (grpc_static_slice_table[70])
#define GRPC_MDSTR_COOKIE (grpc_static_slice_table[68])
/* "date" */
#define GRPC_MDSTR_DATE (grpc_static_slice_table[71])
#define GRPC_MDSTR_DATE (grpc_static_slice_table[69])
/* "etag" */
#define GRPC_MDSTR_ETAG (grpc_static_slice_table[72])
#define GRPC_MDSTR_ETAG (grpc_static_slice_table[70])
/* "expect" */
#define GRPC_MDSTR_EXPECT (grpc_static_slice_table[73])
#define GRPC_MDSTR_EXPECT (grpc_static_slice_table[71])
/* "expires" */
#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table[74])
#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table[72])
/* "from" */
#define GRPC_MDSTR_FROM (grpc_static_slice_table[75])
#define GRPC_MDSTR_FROM (grpc_static_slice_table[73])
/* "if-match" */
#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table[76])
#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table[74])
/* "if-modified-since" */
#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table[77])
#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table[75])
/* "if-none-match" */
#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table[78])
#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table[76])
/* "if-range" */
#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table[79])
#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table[77])
/* "if-unmodified-since" */
#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table[80])
#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table[78])
/* "last-modified" */
#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table[81])
#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table[79])
/* "lb-cost-bin" */
#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table[82])
#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table[80])
/* "link" */
#define GRPC_MDSTR_LINK (grpc_static_slice_table[83])
#define GRPC_MDSTR_LINK (grpc_static_slice_table[81])
/* "location" */
#define GRPC_MDSTR_LOCATION (grpc_static_slice_table[84])
#define GRPC_MDSTR_LOCATION (grpc_static_slice_table[82])
/* "max-forwards" */
#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table[85])
#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table[83])
/* "proxy-authenticate" */
#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table[86])
#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table[84])
/* "proxy-authorization" */
#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table[87])
#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table[85])
/* "range" */
#define GRPC_MDSTR_RANGE (grpc_static_slice_table[88])
#define GRPC_MDSTR_RANGE (grpc_static_slice_table[86])
/* "referer" */
#define GRPC_MDSTR_REFERER (grpc_static_slice_table[89])
#define GRPC_MDSTR_REFERER (grpc_static_slice_table[87])
/* "refresh" */
#define GRPC_MDSTR_REFRESH (grpc_static_slice_table[90])
#define GRPC_MDSTR_REFRESH (grpc_static_slice_table[88])
/* "retry-after" */
#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table[91])
#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table[89])
/* "server" */
#define GRPC_MDSTR_SERVER (grpc_static_slice_table[92])
#define GRPC_MDSTR_SERVER (grpc_static_slice_table[90])
/* "set-cookie" */
#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[93])
#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[91])
/* "strict-transport-security" */
#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[94])
#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[92])
/* "transfer-encoding" */
#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[95])
#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[93])
/* "vary" */
#define GRPC_MDSTR_VARY (grpc_static_slice_table[96])
#define GRPC_MDSTR_VARY (grpc_static_slice_table[94])
/* "via" */
#define GRPC_MDSTR_VIA (grpc_static_slice_table[97])
#define GRPC_MDSTR_VIA (grpc_static_slice_table[95])
/* "www-authenticate" */
#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[98])
#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[96])
/* "identity,deflate" */
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table[99])
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table[97])
/* "identity,gzip" */
#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table[100])
#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table[98])
/* "deflate,gzip" */
#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table[101])
#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table[99])
/* "identity,deflate,gzip" */
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \
(grpc_static_slice_table[102])
(grpc_static_slice_table[100])
extern const grpc_slice_refcount_vtable grpc_static_metadata_vtable;
extern grpc_slice_refcount
@ -590,5 +586,4 @@ extern const uint8_t grpc_static_accept_stream_encoding_metadata[4];
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table \
[grpc_static_accept_stream_encoding_metadata[(algs)]], \
GRPC_MDELEM_STORAGE_STATIC))
#endif /* GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H */

@ -685,7 +685,7 @@ namespace Grpc.IntegrationTesting
private static Metadata CreateClientCompressionMetadata(bool compressed)
{
var algorithmName = compressed ? "message/gzip" : "identity";
var algorithmName = compressed ? "gzip" : "identity";
return new Metadata
{
{ new Metadata.Entry(Metadata.CompressionRequestAlgorithmMetadataKey, algorithmName) }

@ -46,10 +46,10 @@
hostConfig.compressAlgorithm = GRPC_COMPRESS_NONE;
break;
case GRPCCompressDeflate:
hostConfig.compressAlgorithm = GRPC_COMPRESS_MESSAGE_DEFLATE;
hostConfig.compressAlgorithm = GRPC_COMPRESS_DEFLATE;
break;
case GRPCCompressGzip:
hostConfig.compressAlgorithm = GRPC_COMPRESS_MESSAGE_GZIP;
hostConfig.compressAlgorithm = GRPC_COMPRESS_GZIP;
break;
default:
NSLog(@"Invalid compression algorithm");

@ -557,8 +557,8 @@ cdef extern from "grpc/compression.h":
ctypedef enum grpc_compression_algorithm:
GRPC_COMPRESS_NONE
GRPC_COMPRESS_MESSAGE_DEFLATE
GRPC_COMPRESS_MESSAGE_GZIP
GRPC_COMPRESS_DEFLATE
GRPC_COMPRESS_GZIP
GRPC_COMPRESS_STREAM_GZIP
GRPC_COMPRESS_ALGORITHMS_COUNT

@ -112,8 +112,8 @@ class OperationType:
class CompressionAlgorithm:
none = GRPC_COMPRESS_NONE
deflate = GRPC_COMPRESS_MESSAGE_DEFLATE
gzip = GRPC_COMPRESS_MESSAGE_GZIP
deflate = GRPC_COMPRESS_DEFLATE
gzip = GRPC_COMPRESS_GZIP
class CompressionLevel:

@ -70,7 +70,6 @@ CORE_SOURCE_FILES = [
'src/core/lib/channel/handshaker_registry.cc',
'src/core/lib/compression/compression.cc',
'src/core/lib/compression/compression_internal.cc',
'src/core/lib/compression/compression_ruby.cc',
'src/core/lib/compression/message_compress.cc',
'src/core/lib/compression/stream_compression.cc',
'src/core/lib/compression/stream_compression_gzip.cc',

@ -23,7 +23,6 @@
#include "rb_grpc_imports.generated.h"
#include <grpc/compression.h>
#include <grpc/compression_ruby.h>
#include <grpc/grpc.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/grpc_types.h>
@ -175,7 +174,7 @@ void grpc_rb_compression_options_algorithm_name_to_value_internal(
/* Raise an error if the name isn't recognized as a compression algorithm by
* the algorithm parse function
* in GRPC core. */
if (!grpc_compression_algorithm_parse_ruby(name_slice, algorithm_value)) {
if (!grpc_compression_algorithm_parse(name_slice, algorithm_value)) {
tmp_str = grpc_slice_to_c_string(name_slice);
rb_raise(rb_eNameError, "Invalid compression algorithm name: %s", tmp_str);
}
@ -287,7 +286,7 @@ VALUE grpc_rb_compression_options_algorithm_value_to_name_internal(
grpc_compression_algorithm internal_value) {
char* algorithm_name = NULL;
if (!grpc_compression_algorithm_name_ruby(internal_value, &algorithm_name)) {
if (!grpc_compression_algorithm_name(internal_value, &algorithm_name)) {
rb_raise(rb_eArgError, "Failed to convert algorithm value to name");
}

@ -31,8 +31,6 @@ grpc_compression_options_init_type grpc_compression_options_init_import;
grpc_compression_options_enable_algorithm_type grpc_compression_options_enable_algorithm_import;
grpc_compression_options_disable_algorithm_type grpc_compression_options_disable_algorithm_import;
grpc_compression_options_is_algorithm_enabled_type grpc_compression_options_is_algorithm_enabled_import;
grpc_compression_algorithm_parse_ruby_type grpc_compression_algorithm_parse_ruby_import;
grpc_compression_algorithm_name_ruby_type grpc_compression_algorithm_name_ruby_import;
grpc_metadata_array_init_type grpc_metadata_array_init_import;
grpc_metadata_array_destroy_type grpc_metadata_array_destroy_import;
grpc_call_details_init_type grpc_call_details_init_import;
@ -300,8 +298,6 @@ void grpc_rb_load_imports(HMODULE library) {
grpc_compression_options_enable_algorithm_import = (grpc_compression_options_enable_algorithm_type) GetProcAddress(library, "grpc_compression_options_enable_algorithm");
grpc_compression_options_disable_algorithm_import = (grpc_compression_options_disable_algorithm_type) GetProcAddress(library, "grpc_compression_options_disable_algorithm");
grpc_compression_options_is_algorithm_enabled_import = (grpc_compression_options_is_algorithm_enabled_type) GetProcAddress(library, "grpc_compression_options_is_algorithm_enabled");
grpc_compression_algorithm_parse_ruby_import = (grpc_compression_algorithm_parse_ruby_type) GetProcAddress(library, "grpc_compression_algorithm_parse_ruby");
grpc_compression_algorithm_name_ruby_import = (grpc_compression_algorithm_name_ruby_type) GetProcAddress(library, "grpc_compression_algorithm_name_ruby");
grpc_metadata_array_init_import = (grpc_metadata_array_init_type) GetProcAddress(library, "grpc_metadata_array_init");
grpc_metadata_array_destroy_import = (grpc_metadata_array_destroy_type) GetProcAddress(library, "grpc_metadata_array_destroy");
grpc_call_details_init_import = (grpc_call_details_init_type) GetProcAddress(library, "grpc_call_details_init");

@ -26,7 +26,6 @@
#include <windows.h>
#include <grpc/compression.h>
#include <grpc/compression_ruby.h>
#include <grpc/grpc.h>
#include <grpc/grpc_posix.h>
#include <grpc/grpc_security.h>
@ -73,12 +72,6 @@ extern grpc_compression_options_disable_algorithm_type grpc_compression_options_
typedef int(*grpc_compression_options_is_algorithm_enabled_type)(const grpc_compression_options* opts, grpc_compression_algorithm algorithm);
extern grpc_compression_options_is_algorithm_enabled_type grpc_compression_options_is_algorithm_enabled_import;
#define grpc_compression_options_is_algorithm_enabled grpc_compression_options_is_algorithm_enabled_import
typedef int(*grpc_compression_algorithm_parse_ruby_type)(grpc_slice value, grpc_compression_algorithm* algorithm);
extern grpc_compression_algorithm_parse_ruby_type grpc_compression_algorithm_parse_ruby_import;
#define grpc_compression_algorithm_parse_ruby grpc_compression_algorithm_parse_ruby_import
typedef int(*grpc_compression_algorithm_name_ruby_type)(grpc_compression_algorithm algorithm, const char** name);
extern grpc_compression_algorithm_name_ruby_type grpc_compression_algorithm_name_ruby_import;
#define grpc_compression_algorithm_name_ruby grpc_compression_algorithm_name_ruby_import
typedef void(*grpc_metadata_array_init_type)(grpc_metadata_array* array);
extern grpc_metadata_array_init_type grpc_metadata_array_init_import;
#define grpc_metadata_array_init grpc_metadata_array_init_import

@ -62,8 +62,8 @@ static void test_set_compression_algorithm(void) {
grpc_core::ExecCtx exec_ctx;
grpc_channel_args* ch_args;
ch_args = grpc_channel_args_set_compression_algorithm(
nullptr, GRPC_COMPRESS_MESSAGE_GZIP);
ch_args =
grpc_channel_args_set_compression_algorithm(nullptr, GRPC_COMPRESS_GZIP);
GPR_ASSERT(ch_args->num_args == 1);
GPR_ASSERT(strcmp(ch_args->args[0].key,
GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM) == 0);
@ -88,12 +88,12 @@ static void test_compression_algorithm_states(void) {
GPR_ASSERT(GPR_BITGET(states_bitset, i));
}
/* disable message/gzip and message/deflate and stream/gzip */
/* disable gzip and deflate and stream/gzip */
ch_args_wo_gzip = grpc_channel_args_compression_algorithm_set_state(
&ch_args, GRPC_COMPRESS_MESSAGE_GZIP, 0);
&ch_args, GRPC_COMPRESS_GZIP, 0);
GPR_ASSERT(ch_args == ch_args_wo_gzip);
ch_args_wo_gzip_deflate = grpc_channel_args_compression_algorithm_set_state(
&ch_args_wo_gzip, GRPC_COMPRESS_MESSAGE_DEFLATE, 0);
&ch_args_wo_gzip, GRPC_COMPRESS_DEFLATE, 0);
GPR_ASSERT(ch_args_wo_gzip == ch_args_wo_gzip_deflate);
ch_args_wo_gzip_deflate_gzip =
grpc_channel_args_compression_algorithm_set_state(
@ -103,7 +103,7 @@ static void test_compression_algorithm_states(void) {
states_bitset = (unsigned)grpc_channel_args_compression_algorithm_get_states(
ch_args_wo_gzip_deflate);
for (i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) {
if (i == GRPC_COMPRESS_MESSAGE_GZIP || i == GRPC_COMPRESS_MESSAGE_DEFLATE ||
if (i == GRPC_COMPRESS_GZIP || i == GRPC_COMPRESS_DEFLATE ||
i == GRPC_COMPRESS_STREAM_GZIP) {
GPR_ASSERT(GPR_BITGET(states_bitset, i) == 0);
} else {
@ -111,9 +111,9 @@ static void test_compression_algorithm_states(void) {
}
}
/* re-enabled message/gzip and stream/gzip only */
/* re-enabled gzip and stream/gzip only */
ch_args_wo_gzip = grpc_channel_args_compression_algorithm_set_state(
&ch_args_wo_gzip_deflate_gzip, GRPC_COMPRESS_MESSAGE_GZIP, 1);
&ch_args_wo_gzip_deflate_gzip, GRPC_COMPRESS_GZIP, 1);
ch_args_wo_gzip = grpc_channel_args_compression_algorithm_set_state(
&ch_args_wo_gzip, GRPC_COMPRESS_STREAM_GZIP, 1);
GPR_ASSERT(ch_args_wo_gzip == ch_args_wo_gzip_deflate_gzip);
@ -121,7 +121,7 @@ static void test_compression_algorithm_states(void) {
states_bitset = (unsigned)grpc_channel_args_compression_algorithm_get_states(
ch_args_wo_gzip);
for (i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) {
if (i == GRPC_COMPRESS_MESSAGE_DEFLATE) {
if (i == GRPC_COMPRESS_DEFLATE) {
GPR_ASSERT(GPR_BITGET(states_bitset, i) == 0);
} else {
GPR_ASSERT(GPR_BITGET(states_bitset, i) != 0);

@ -29,7 +29,7 @@
#include "src/core/lib/transport/static_metadata.h"
#include "test/core/util/test_config.h"
const uint32_t message_prefix_length = 8;
const uint32_t message_prefix_length = 0;
const uint32_t stream_prefix_length = 7;
static void test_algorithm_mesh(void) {
int i;

@ -28,11 +28,10 @@
static void test_compression_algorithm_parse(void) {
size_t i;
const char* valid_names[] = {"identity", "message/gzip", "message/deflate",
"stream/gzip"};
const char* valid_names[] = {"identity", "gzip", "deflate", "stream/gzip"};
const grpc_compression_algorithm valid_algorithms[] = {
GRPC_COMPRESS_NONE, GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_COMPRESS_MESSAGE_DEFLATE, GRPC_COMPRESS_STREAM_GZIP};
GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_DEFLATE,
GRPC_COMPRESS_STREAM_GZIP};
const char* invalid_names[] = {"gzip2", "foo", "", "2gzip"};
gpr_log(GPR_DEBUG, "test_compression_algorithm_parse");
@ -61,11 +60,10 @@ static void test_compression_algorithm_name(void) {
int success;
const char* name;
size_t i;
const char* valid_names[] = {"identity", "message/gzip", "message/deflate",
"stream/gzip"};
const char* valid_names[] = {"identity", "gzip", "deflate", "stream/gzip"};
const grpc_compression_algorithm valid_algorithms[] = {
GRPC_COMPRESS_NONE, GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_COMPRESS_MESSAGE_DEFLATE, GRPC_COMPRESS_STREAM_GZIP};
GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_DEFLATE,
GRPC_COMPRESS_STREAM_GZIP};
gpr_log(GPR_DEBUG, "test_compression_algorithm_name");
@ -110,21 +108,21 @@ static void test_compression_algorithm_for_level(void) {
/* accept only gzip */
uint32_t accepted_encodings = 0;
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_GZIP);
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP);
GPR_ASSERT(GRPC_COMPRESS_NONE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_GZIP ==
GPR_ASSERT(GRPC_COMPRESS_GZIP ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_GZIP ==
GPR_ASSERT(GRPC_COMPRESS_GZIP ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_GZIP ==
GPR_ASSERT(GRPC_COMPRESS_GZIP ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings));
}
@ -133,21 +131,21 @@ static void test_compression_algorithm_for_level(void) {
/* accept only deflate */
uint32_t accepted_encodings = 0;
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_DEFLATE);
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE);
GPR_ASSERT(GRPC_COMPRESS_NONE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE ==
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE ==
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE ==
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings));
}
@ -156,22 +154,22 @@ static void test_compression_algorithm_for_level(void) {
/* accept gzip and deflate */
uint32_t accepted_encodings = 0;
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_GZIP);
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_DEFLATE);
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP);
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE);
GPR_ASSERT(GRPC_COMPRESS_NONE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_GZIP ==
GPR_ASSERT(GRPC_COMPRESS_GZIP ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE ==
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE ==
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings));
}
@ -203,23 +201,23 @@ static void test_compression_algorithm_for_level(void) {
/* accept all algorithms */
uint32_t accepted_encodings = 0;
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_GZIP);
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_DEFLATE);
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP);
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE);
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_STREAM_GZIP);
GPR_ASSERT(GRPC_COMPRESS_NONE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_GZIP ==
GPR_ASSERT(GRPC_COMPRESS_GZIP ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE ==
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE ==
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings));
}

@ -70,7 +70,7 @@ void chttp2_init_client_fullstack_compression(grpc_end2end_test_fixture* f,
grpc_channel_args_destroy(ffd->client_args_compression);
}
ffd->client_args_compression = grpc_channel_args_set_compression_algorithm(
client_args, GRPC_COMPRESS_MESSAGE_GZIP);
client_args, GRPC_COMPRESS_GZIP);
f->client = grpc_insecure_channel_create(
ffd->localaddr, ffd->client_args_compression, nullptr);
}
@ -84,7 +84,7 @@ void chttp2_init_server_fullstack_compression(grpc_end2end_test_fixture* f,
grpc_channel_args_destroy(ffd->server_args_compression);
}
ffd->server_args_compression = grpc_channel_args_set_compression_algorithm(
server_args, GRPC_COMPRESS_MESSAGE_GZIP);
server_args, GRPC_COMPRESS_GZIP);
if (f->server) {
grpc_server_destroy(f->server);
}

@ -28,15 +28,13 @@
"\x1Egrpc.max_request_message_bytes"
"\x1Fgrpc.max_response_message_bytes"
"$/grpc.lb.v1.LoadBalancer/BalanceLoad"
"\x0Fmessage/deflate"
"\x0Cmessage/gzip"
"\x07deflate"
"\x04gzip"
"\x0Bstream/gzip"
"\x010"
"\x011"
"\x012"
"\x08identity"
"\x04gzip"
"\x07deflate"
"\x08trailers"
"\x10application/grpc"
"\x04POST"

@ -383,9 +383,9 @@ static void request_with_payload_template(
GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
GRPC_COMPRESS_NONE) != 0);
GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
GRPC_COMPRESS_MESSAGE_DEFLATE) != 0);
GRPC_COMPRESS_DEFLATE) != 0);
GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
GRPC_COMPRESS_MESSAGE_GZIP) != 0);
GRPC_COMPRESS_GZIP) != 0);
memset(ops, 0, sizeof(ops));
op = ops;
@ -550,9 +550,8 @@ static void test_invoke_request_with_exceptionally_uncompressed_payload(
grpc_end2end_test_config config) {
request_with_payload_template(
config, "test_invoke_request_with_exceptionally_uncompressed_payload",
GRPC_WRITE_NO_COMPRESS, GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_COMPRESS_MESSAGE_GZIP, GRPC_COMPRESS_NONE,
GRPC_COMPRESS_MESSAGE_GZIP, nullptr, false,
GRPC_WRITE_NO_COMPRESS, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP,
GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP, nullptr, false,
/* ignored */ GRPC_COMPRESS_LEVEL_NONE, false);
}
@ -569,8 +568,8 @@ static void test_invoke_request_with_compressed_payload(
grpc_end2end_test_config config) {
request_with_payload_template(
config, "test_invoke_request_with_compressed_payload", 0,
GRPC_COMPRESS_MESSAGE_GZIP, GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_COMPRESS_MESSAGE_GZIP, GRPC_COMPRESS_MESSAGE_GZIP, nullptr, false,
GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP,
GRPC_COMPRESS_GZIP, nullptr, false,
/* ignored */ GRPC_COMPRESS_LEVEL_NONE, false);
}
@ -578,8 +577,8 @@ static void test_invoke_request_with_send_message_before_initial_metadata(
grpc_end2end_test_config config) {
request_with_payload_template(
config, "test_invoke_request_with_compressed_payload", 0,
GRPC_COMPRESS_MESSAGE_GZIP, GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_COMPRESS_MESSAGE_GZIP, GRPC_COMPRESS_MESSAGE_GZIP, nullptr, false,
GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP,
GRPC_COMPRESS_GZIP, nullptr, false,
/* ignored */ GRPC_COMPRESS_LEVEL_NONE, true);
}
@ -597,8 +596,7 @@ static void test_invoke_request_with_compressed_payload_md_override(
grpc_metadata identity_compression_override;
gzip_compression_override.key = GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST;
gzip_compression_override.value =
grpc_slice_from_static_string("message/gzip");
gzip_compression_override.value = grpc_slice_from_static_string("gzip");
memset(&gzip_compression_override.internal_data, 0,
sizeof(gzip_compression_override.internal_data));
@ -611,32 +609,31 @@ static void test_invoke_request_with_compressed_payload_md_override(
/* Channel default NONE (aka IDENTITY), call override to GZIP */
request_with_payload_template(
config, "test_invoke_request_with_compressed_payload_md_override_1", 0,
GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE, GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP,
GRPC_COMPRESS_NONE, &gzip_compression_override, false,
/*ignored*/ GRPC_COMPRESS_LEVEL_NONE, false);
/* Channel default DEFLATE, call override to GZIP */
request_with_payload_template(
config, "test_invoke_request_with_compressed_payload_md_override_2", 0,
GRPC_COMPRESS_MESSAGE_DEFLATE, GRPC_COMPRESS_NONE,
GRPC_COMPRESS_MESSAGE_GZIP, GRPC_COMPRESS_NONE,
&gzip_compression_override, false,
GRPC_COMPRESS_DEFLATE, GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP,
GRPC_COMPRESS_NONE, &gzip_compression_override, false,
/*ignored*/ GRPC_COMPRESS_LEVEL_NONE, false);
/* Channel default DEFLATE, call override to NONE (aka IDENTITY) */
request_with_payload_template(
config, "test_invoke_request_with_compressed_payload_md_override_3", 0,
GRPC_COMPRESS_MESSAGE_DEFLATE, GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE,
GRPC_COMPRESS_DEFLATE, GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE,
GRPC_COMPRESS_NONE, &identity_compression_override, false,
/*ignored*/ GRPC_COMPRESS_LEVEL_NONE, false);
}
static void test_invoke_request_with_disabled_algorithm(
grpc_end2end_test_config config) {
request_for_disabled_algorithm(
config, "test_invoke_request_with_disabled_algorithm", 0,
GRPC_COMPRESS_MESSAGE_GZIP, GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_STATUS_UNIMPLEMENTED, nullptr);
request_for_disabled_algorithm(config,
"test_invoke_request_with_disabled_algorithm",
0, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP,
GRPC_STATUS_UNIMPLEMENTED, nullptr);
}
void compressed_payload(grpc_end2end_test_config config) {

@ -390,9 +390,9 @@ static void request_with_payload_template(
GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
GRPC_COMPRESS_NONE) != 0);
GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
GRPC_COMPRESS_MESSAGE_DEFLATE) != 0);
GRPC_COMPRESS_DEFLATE) != 0);
GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
GRPC_COMPRESS_MESSAGE_GZIP) != 0);
GRPC_COMPRESS_GZIP) != 0);
GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
GRPC_COMPRESS_STREAM_GZIP) != 0);
GPR_ASSERT(GPR_BITCOUNT(grpc_call_test_only_get_encodings_accepted_by_peer(

@ -207,9 +207,9 @@ static void request_with_payload_template(
GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
GRPC_COMPRESS_NONE) != 0);
GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
GRPC_COMPRESS_MESSAGE_DEFLATE) != 0);
GRPC_COMPRESS_DEFLATE) != 0);
GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s),
GRPC_COMPRESS_MESSAGE_GZIP) != 0);
GRPC_COMPRESS_GZIP) != 0);
memset(ops, 0, sizeof(ops));
op = ops;
@ -365,16 +365,16 @@ typedef struct workaround_cronet_compression_config {
} workaround_cronet_compression_config;
static workaround_cronet_compression_config workaround_configs[] = {
{nullptr, GRPC_COMPRESS_MESSAGE_GZIP},
{nullptr, GRPC_COMPRESS_GZIP},
{const_cast<char*>(
"grpc-objc/1.3.0-dev grpc-c/3.0.0-dev (ios; cronet_http; gentle)"),
GRPC_COMPRESS_NONE},
{const_cast<char*>(
"grpc-objc/1.3.0-dev grpc-c/3.0.0-dev (ios; chttp2; gentle)"),
GRPC_COMPRESS_MESSAGE_GZIP},
GRPC_COMPRESS_GZIP},
{const_cast<char*>(
"grpc-objc/1.4.0 grpc-c/3.0.0-dev (ios; cronet_http; gentle)"),
GRPC_COMPRESS_MESSAGE_GZIP}};
GRPC_COMPRESS_GZIP}};
static const size_t workaround_configs_num =
sizeof(workaround_configs) / sizeof(*workaround_configs);
@ -383,8 +383,7 @@ static void test_workaround_cronet_compression(
for (uint32_t i = 0; i < workaround_configs_num; i++) {
request_with_payload_template(
config, "test_invoke_request_with_compressed_payload", 0,
GRPC_COMPRESS_MESSAGE_GZIP, GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP,
workaround_configs[i].expected_algorithm_from_server, nullptr, false,
/* ignored */ GRPC_COMPRESS_LEVEL_NONE,
workaround_configs[i].user_agent_override);

@ -109,7 +109,7 @@ static void test_read_corrupted_slice(void) {
LOG_TEST("test_read_corrupted_slice");
slice = grpc_slice_from_copied_string("test");
buffer = grpc_raw_byte_buffer_create(&slice, 1);
buffer->data.raw.compression = GRPC_COMPRESS_MESSAGE_GZIP; /* lies! */
buffer->data.raw.compression = GRPC_COMPRESS_GZIP; /* lies! */
grpc_slice_unref(slice);
GPR_ASSERT(!grpc_byte_buffer_reader_init(&reader, buffer));
grpc_byte_buffer_destroy(buffer);
@ -161,13 +161,13 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm,
static void test_read_gzip_compressed_slice(void) {
const size_t INPUT_SIZE = 2048;
LOG_TEST("test_read_gzip_compressed_slice");
read_compressed_slice(GRPC_COMPRESS_MESSAGE_GZIP, INPUT_SIZE);
read_compressed_slice(GRPC_COMPRESS_GZIP, INPUT_SIZE);
}
static void test_read_deflate_compressed_slice(void) {
const size_t INPUT_SIZE = 2048;
LOG_TEST("test_read_deflate_compressed_slice");
read_compressed_slice(GRPC_COMPRESS_MESSAGE_DEFLATE, INPUT_SIZE);
read_compressed_slice(GRPC_COMPRESS_DEFLATE, INPUT_SIZE);
}
static void test_byte_buffer_from_reader(void) {

@ -20,7 +20,6 @@
#include <grpc/byte_buffer_reader.h>
#include <grpc/census.h>
#include <grpc/compression.h>
#include <grpc/compression_ruby.h>
#include <grpc/fork.h>
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
@ -76,8 +75,6 @@ int main(int argc, char **argv) {
printf("%lx", (unsigned long) grpc_compression_options_enable_algorithm);
printf("%lx", (unsigned long) grpc_compression_options_disable_algorithm);
printf("%lx", (unsigned long) grpc_compression_options_is_algorithm_enabled);
printf("%lx", (unsigned long) grpc_compression_algorithm_parse_ruby);
printf("%lx", (unsigned long) grpc_compression_algorithm_name_ruby);
printf("%lx", (unsigned long) grpc_metadata_array_init);
printf("%lx", (unsigned long) grpc_metadata_array_destroy);
printf("%lx", (unsigned long) grpc_call_details_init);

@ -350,7 +350,7 @@ static void SendRpc(grpc::testing::EchoTestService::Stub* stub, int num_rpcs,
char bytes[8] = {'\0', '\1', '\2', '\3', '\4', '\5', '\6', (char)i};
context.AddMetadata("custom-bin", grpc::string(bytes, 8));
}
context.set_compression_algorithm(GRPC_COMPRESS_MESSAGE_GZIP);
context.set_compression_algorithm(GRPC_COMPRESS_GZIP);
Status s = stub->Echo(&context, request, &response);
EXPECT_EQ(response.message(), request.message());
EXPECT_TRUE(s.ok());

@ -266,7 +266,7 @@ TEST_F(FilterEnd2endTest, SimpleBidiStreaming) {
GenericServerContext srv_ctx;
GenericServerAsyncReaderWriter srv_stream(&srv_ctx);
cli_ctx.set_compression_algorithm(GRPC_COMPRESS_MESSAGE_GZIP);
cli_ctx.set_compression_algorithm(GRPC_COMPRESS_GZIP);
send_request.set_message("Hello");
std::unique_ptr<GenericClientAsyncReaderWriter> cli_stream =
generic_stub_->PrepareCall(&cli_ctx, kMethodName, &cli_cq_);

@ -269,7 +269,7 @@ TEST_F(GenericEnd2endTest, SimpleBidiStreaming) {
GenericServerContext srv_ctx;
GenericServerAsyncReaderWriter srv_stream(&srv_ctx);
cli_ctx.set_compression_algorithm(GRPC_COMPRESS_MESSAGE_GZIP);
cli_ctx.set_compression_algorithm(GRPC_COMPRESS_GZIP);
send_request.set_message("Hello");
std::unique_ptr<GenericClientAsyncReaderWriter> cli_stream =
generic_stub_->PrepareCall(&cli_ctx, kMethodName, &cli_cq_);

@ -251,7 +251,7 @@ TEST_P(ServerBuilderPluginTest, PluginWithServiceTest) {
EchoResponse response;
request.set_message("Hello hello hello hello");
ClientContext context;
context.set_compression_algorithm(GRPC_COMPRESS_MESSAGE_GZIP);
context.set_compression_algorithm(GRPC_COMPRESS_GZIP);
Status s = stub_->Echo(&context, request, &response);
EXPECT_EQ(response.message(), request.message());
EXPECT_TRUE(s.ok());

@ -189,7 +189,7 @@ bool InteropClient::PerformLargeUnary(SimpleRequest* request,
request->mutable_payload()->set_body(payload.c_str(), kLargeRequestSize);
if (request->has_expect_compressed()) {
if (request->expect_compressed().value()) {
context.set_compression_algorithm(GRPC_COMPRESS_MESSAGE_GZIP);
context.set_compression_algorithm(GRPC_COMPRESS_GZIP);
} else {
context.set_compression_algorithm(GRPC_COMPRESS_NONE);
}
@ -497,7 +497,7 @@ bool InteropClient::DoClientCompressedStreaming() {
StreamingInputCallRequest request;
StreamingInputCallResponse response;
context.set_compression_algorithm(GRPC_COMPRESS_MESSAGE_GZIP);
context.set_compression_algorithm(GRPC_COMPRESS_GZIP);
std::unique_ptr<ClientWriter<StreamingInputCallRequest>> stream(
serviceStub_.Get()->StreamingInputCall(&context, &response));

@ -54,8 +54,8 @@ CONFIG = [
# well known method names
'/grpc.lb.v1.LoadBalancer/BalanceLoad',
# compression algorithm names
'message/deflate',
'message/gzip',
'deflate',
'gzip',
'stream/gzip',
# metadata elements
('grpc-status', '0'),

@ -875,7 +875,6 @@ include/grpc++/support/time.h \
include/grpc/byte_buffer.h \
include/grpc/byte_buffer_reader.h \
include/grpc/compression.h \
include/grpc/compression_ruby.h \
include/grpc/fork.h \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \

@ -876,7 +876,6 @@ include/grpc++/support/time.h \
include/grpc/byte_buffer.h \
include/grpc/byte_buffer_reader.h \
include/grpc/compression.h \
include/grpc/compression_ruby.h \
include/grpc/fork.h \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \

@ -801,7 +801,6 @@ include/grpc/byte_buffer.h \
include/grpc/byte_buffer_reader.h \
include/grpc/census.h \
include/grpc/compression.h \
include/grpc/compression_ruby.h \
include/grpc/fork.h \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \

@ -801,7 +801,6 @@ include/grpc/byte_buffer.h \
include/grpc/byte_buffer_reader.h \
include/grpc/census.h \
include/grpc/compression.h \
include/grpc/compression_ruby.h \
include/grpc/fork.h \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \
@ -1053,7 +1052,6 @@ src/core/lib/compression/algorithm_metadata.h \
src/core/lib/compression/compression.cc \
src/core/lib/compression/compression_internal.cc \
src/core/lib/compression/compression_internal.h \
src/core/lib/compression/compression_ruby.cc \
src/core/lib/compression/message_compress.cc \
src/core/lib/compression/message_compress.h \
src/core/lib/compression/stream_compression.cc \

@ -8391,7 +8391,6 @@
"src/core/lib/channel/handshaker_registry.cc",
"src/core/lib/compression/compression.cc",
"src/core/lib/compression/compression_internal.cc",
"src/core/lib/compression/compression_ruby.cc",
"src/core/lib/compression/message_compress.cc",
"src/core/lib/compression/stream_compression.cc",
"src/core/lib/compression/stream_compression_gzip.cc",
@ -8529,7 +8528,6 @@
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/compression_ruby.h",
"include/grpc/fork.h",
"include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
@ -8671,7 +8669,6 @@
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/compression_ruby.h",
"include/grpc/fork.h",
"include/grpc/grpc.h",
"include/grpc/grpc_posix.h",

Loading…
Cancel
Save