MINOR: compression: Store algo and type for both request and response

Make provision for being able to store both compression algorithms and
content-types to compress for both requests and responses. For now only
the responses one are used.
This commit is contained in:
Olivier Houchard
2023-04-05 17:32:36 +02:00
committed by Olivier Houchard
parent dfc11da561
commit db573e9c58
5 changed files with 30 additions and 26 deletions

View File

@@ -43,8 +43,10 @@
#define COMP_FL_OFFLOAD 0x00000001 /* Compression offload */
struct comp {
struct comp_algo *algos;
struct comp_type *types;
struct comp_algo *algos_res; /* Algos available for response */
struct comp_algo *algo_req; /* Algo to use for request */
struct comp_type *types_req; /* Types to be compressed for requests */
struct comp_type *types_res; /* Types to be compressed for responses */
unsigned int flags;
};

View File

@@ -27,8 +27,8 @@
extern unsigned int compress_min_idle;
int comp_append_type(struct comp *comp, const char *type);
int comp_append_algo(struct comp *comp, const char *algo);
int comp_append_type(struct comp_type **types, const char *type);
int comp_append_algo(struct comp_algo **algos, const char *algo);
#ifdef USE_ZLIB
extern long zlib_used_memory;