ELinks 0.18.0
gzip.c File Reference
#include <stdio.h>
#include <string.h>
#include <zlib.h>
#include <errno.h>
#include "elinks.h"
#include "encoding/encoding.h"
#include "encoding/gzip.h"
#include "util/memcount.h"
#include "util/memory.h"
Include dependency graph for gzip.c:

Data Structures

struct  deflate_enc_data

Macros

#define ELINKS_DEFLATE_BUFFER_LENGTH   5000

Functions

static int deflate_open (int window_size, struct stream_encoded *stream, int fd)
static int deflate_gzip_open (struct stream_encoded *stream, int fd)
static char * deflate_gzip_decode_buffer (struct stream_encoded *st, char *data, int len, int *new_len)
static int deflate_read (struct stream_encoded *stream, char *buf, int len)
static char * deflate_decode_buffer (struct stream_encoded *st, int window_size, char *datac, int len, int *new_len)
static void deflate_close (struct stream_encoded *stream)
const char * get_gzip_version (void)

Variables

static const char *const gzip_extensions [] = { ".gz", ".tgz", NULL }
const struct decoding_backend gzip_decoding_backend

Macro Definition Documentation

◆ ELINKS_DEFLATE_BUFFER_LENGTH

#define ELINKS_DEFLATE_BUFFER_LENGTH   5000

Function Documentation

◆ deflate_close()

void deflate_close ( struct stream_encoded * stream)
static

◆ deflate_decode_buffer()

char * deflate_decode_buffer ( struct stream_encoded * st,
int window_size,
char * datac,
int len,
int * new_len )
static

◆ deflate_gzip_decode_buffer()

char * deflate_gzip_decode_buffer ( struct stream_encoded * st,
char * data,
int len,
int * new_len )
static

◆ deflate_gzip_open()

int deflate_gzip_open ( struct stream_encoded * stream,
int fd )
static

◆ deflate_open()

int deflate_open ( int window_size,
struct stream_encoded * stream,
int fd )
static

◆ deflate_read()

int deflate_read ( struct stream_encoded * stream,
char * buf,
int len )
static

◆ get_gzip_version()

const char * get_gzip_version ( void )

Variable Documentation

◆ gzip_decoding_backend

const struct decoding_backend gzip_decoding_backend
Initial value:
= {
"gzip",
}
static int deflate_read(struct stream_encoded *stream, char *buf, int len)
Definition gzip.c:99
static void deflate_close(struct stream_encoded *stream)
Definition gzip.c:220
static const char *const gzip_extensions[]
Definition gzip.c:242
static char * deflate_gzip_decode_buffer(struct stream_encoded *st, char *data, int len, int *new_len)
Definition gzip.c:213
static int deflate_gzip_open(struct stream_encoded *stream, int fd)
Definition gzip.c:90

◆ gzip_extensions

const char* const gzip_extensions[] = { ".gz", ".tgz", NULL }
static