GRPC Core 0.10.0.0

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Typedefs | Variables
compress_filter.c File Reference
`#include <assert.h>`
`#include <string.h>`
`#include <grpc/compression.h>`
`#include <grpc/support/log.h>`
`#include <grpc/support/slice_buffer.h>`
`#include "src/core/channel/compress_filter.h"`
`#include "src/core/channel/channel_args.h"`
`#include "src/core/compression/message_compress.h"`

## Data Structures
struct | call_data
struct | channel_data

## Typedefs
typedef struct call_data | call_data
typedef struct channel_data | channel_data

## Variables
const grpc_channel_filter | grpc_compress_filter
| Compression filter for outgoing data. More...

## Typedef Documentation

typedef struct call_data call_data

typedef struct channel_data channel_data

## Variable Documentation

const grpc_channel_filter grpc_compress_filter

Initial value:
= {
compress_start_transport_stream_op,
grpc_channel_next_op,
sizeof(call_data),
init_call_elem,
destroy_call_elem,
sizeof(channel_data),
init_channel_elem,
destroy_channel_elem,
grpc_call_next_get_peer,
"compress"}
grpc_call_next_get_peer
char * grpc_call_next_get_peer(grpc_call_element *elem)
Definition: channel_stack.c:194
channel_data
Definition: client_auth_filter.c:69
grpc_channel_next_op
void grpc_channel_next_op(grpc_channel_element *elem, grpc_transport_op *op)
Definition: channel_stack.c:199
call_data
struct call_data call_data

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_COMPRESS_REQUEST_ALGORITHM_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.