1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[encoding] Removed deflate

This commit is contained in:
Witold Filipczyk 2021-12-23 15:56:34 +01:00
parent a67c307b03
commit efad299950
5 changed files with 0 additions and 31 deletions

View File

@ -94,7 +94,6 @@ static const struct decoding_backend *const decoding_backends[] = {
&gzip_decoding_backend, &gzip_decoding_backend,
&bzip2_decoding_backend, &bzip2_decoding_backend,
&lzma_decoding_backend, &lzma_decoding_backend,
&deflate_decoding_backend,
&brotli_decoding_backend, &brotli_decoding_backend,
&zstd_decoding_backend &zstd_decoding_backend
}; };

View File

@ -13,7 +13,6 @@ enum stream_encoding {
ENCODING_GZIP, ENCODING_GZIP,
ENCODING_BZIP2, ENCODING_BZIP2,
ENCODING_LZMA, ENCODING_LZMA,
ENCODING_DEFLATE,
ENCODING_BROTLI, ENCODING_BROTLI,
ENCODING_ZSTD, ENCODING_ZSTD,

View File

@ -76,13 +76,6 @@ deflate_open(int window_size, struct stream_encoded *stream, int fd)
return 0; return 0;
} }
static int
deflate_raw_open(struct stream_encoded *stream, int fd)
{
/* raw DEFLATE with neither zlib nor gzip header */
return deflate_open(-MAX_WBITS, stream, fd);
}
static int static int
deflate_gzip_open(struct stream_encoded *stream, int fd) deflate_gzip_open(struct stream_encoded *stream, int fd)
{ {
@ -233,13 +226,6 @@ restart2:
} }
} }
static char *
deflate_raw_decode_buffer(struct stream_encoded *st, char *data, int len, int *new_len)
{
/* raw DEFLATE with neither zlib nor gzip header */
return deflate_decode_buffer(st, -MAX_WBITS, data, len, new_len);
}
static char * static char *
deflate_gzip_decode_buffer(struct stream_encoded *st, char *data, int len, int *new_len) deflate_gzip_decode_buffer(struct stream_encoded *st, char *data, int len, int *new_len)
{ {
@ -264,17 +250,6 @@ deflate_close(struct stream_encoded *stream)
} }
} }
static const char *const deflate_extensions[] = { NULL };
const struct decoding_backend deflate_decoding_backend = {
"deflate",
deflate_extensions,
deflate_raw_open,
deflate_read,
deflate_raw_decode_buffer,
deflate_close,
};
static const char *const gzip_extensions[] = { ".gz", ".tgz", NULL }; static const char *const gzip_extensions[] = { ".gz", ".tgz", NULL };
const struct decoding_backend gzip_decoding_backend = { const struct decoding_backend gzip_decoding_backend = {

View File

@ -8,10 +8,8 @@ extern "C" {
#endif #endif
#ifdef CONFIG_GZIP #ifdef CONFIG_GZIP
extern const struct decoding_backend deflate_decoding_backend;
extern const struct decoding_backend gzip_decoding_backend; extern const struct decoding_backend gzip_decoding_backend;
#else #else
#define deflate_decoding_backend dummy_decoding_backend
#define gzip_decoding_backend dummy_decoding_backend #define gzip_decoding_backend dummy_decoding_backend
#endif #endif

View File

@ -1886,8 +1886,6 @@ again:
if (file_encoding != ENCODING_GZIP if (file_encoding != ENCODING_GZIP
&& (!c_strcasecmp(d, "gzip") || !c_strcasecmp(d, "x-gzip"))) && (!c_strcasecmp(d, "gzip") || !c_strcasecmp(d, "x-gzip")))
conn->content_encoding = ENCODING_GZIP; conn->content_encoding = ENCODING_GZIP;
if (!c_strcasecmp(d, "deflate") || !c_strcasecmp(d, "x-deflate"))
conn->content_encoding = ENCODING_DEFLATE;
#endif #endif
#ifdef CONFIG_ZSTD #ifdef CONFIG_ZSTD