Variables
message_compress_filter.cc File Reference
#include <grpc/support/port_platform.h>
#include "src/core/ext/filters/http/message_compress/message_compress_filter.h"
#include <inttypes.h>
#include <stdlib.h>
#include <new>
#include "absl/meta/type_traits.h"
#include "absl/types/optional.h"
#include "absl/utility/utility.h"
#include <grpc/compression.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/support/log.h>
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/compression/message_compress.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/call_combiner.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/slice/slice_buffer.h"
#include "src/core/lib/surface/call.h"
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/transport.h"
Include dependency graph for message_compress_filter.cc:

Go to the source code of this file.

Variables

const grpc_channel_filter grpc_message_compress_filter
 

Variable Documentation

◆ grpc_message_compress_filter

const grpc_channel_filter grpc_message_compress_filter
Initial value:
= {
CompressStartTransportStreamOpBatch,
nullptr,
sizeof(CallData),
CompressInitCallElem,
CompressDestroyCallElem,
sizeof(ChannelData),
CompressInitChannelElem,
CompressDestroyChannelElem,
"message_compress"}

Compression filter for outgoing data.

See <grpc/compression.h> for the available compression settings.

Compression settings may come from:

  • Channel configuration, as established at channel creation time.
  • The metadata accompanying the outgoing data to be compressed. This is taken as a request only. We may choose not to honor it. The metadata key is given by GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY.

Compression can be disabled for concrete messages (for instance in order to prevent CRIME/BEAST type attacks) by having the GRPC_WRITE_NO_COMPRESS set in the BEGIN_MESSAGE flags.

The attempted compression mechanism is added to the resulting initial metadata under the'grpc-encoding' key.

If compression is actually performed, BEGIN_MESSAGE's flag is modified to incorporate GRPC_WRITE_INTERNAL_COMPRESS. Otherwise, and regardless of the aforementioned 'grpc-encoding' metadata value, data will pass through uncompressed.

Definition at line 321 of file message_compress_filter.cc.

grpc_channel_next_op
void grpc_channel_next_op(grpc_channel_element *elem, grpc_transport_op *op)
Definition: channel_stack.cc:264
grpc_call_stack_ignore_set_pollset_or_pollset_set
void grpc_call_stack_ignore_set_pollset_or_pollset_set(grpc_call_element *, grpc_polling_entity *)
Definition: channel_stack.cc:233
grpc_channel_stack_no_post_init
void grpc_channel_stack_no_post_init(grpc_channel_stack *, grpc_channel_element *)
Definition: channel_stack.cc:282
grpc_channel_next_get_info
void grpc_channel_next_get_info(grpc_channel_element *elem, const grpc_channel_info *channel_info)
Definition: channel_stack.cc:258


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:23