GRPC Core
9.0.0
|
#include <grpc/support/port_platform.h>
#include <assert.h>
#include <string.h>
#include <grpc/compression.h>
#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/ext/filters/http/message_compress/message_compress_filter.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/compression/algorithm_metadata.h"
#include "src/core/lib/compression/compression_args.h"
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/compression/message_compress.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
#include "src/core/lib/surface/call.h"
#include "src/core/lib/transport/static_metadata.h"
Variables | |
const grpc_channel_filter | grpc_message_compress_filter |
Compression filter for outgoing data. More... | |
const grpc_channel_filter grpc_message_compress_filter |
Compression filter for outgoing data.
See <grpc/compression.h> for the available compression settings.
Compression settings may come from:
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.