ELinks 0.16.1.1
brotli.c File Reference
#include <stdio.h>
#include <string.h>
#include <brotli/decode.h>
#include <errno.h>
#include "elinks.h"
#include "encoding/brotli.h"
#include "encoding/encoding.h"
#include "util/math.h"
#include "util/memory.h"
Include dependency graph for brotli.c:

Data Structures

struct  br_enc_data

Macros

#define ELINKS_BROTLI_BUFFER_LENGTH   4096

Functions

static int brotli_open (struct stream_encoded *stream, int fd)
static char * brotli_decode_buffer (struct stream_encoded *st, char *datac, int len, int *new_len)
static int brotli_read (struct stream_encoded *stream, char *buf, int len)
static void brotli_close (struct stream_encoded *stream)
const char * get_brotli_version (void)

Variables

static const char *const brotli_extensions [] = { ".br", NULL }
const struct decoding_backend brotli_decoding_backend

Macro Definition Documentation

◆ ELINKS_BROTLI_BUFFER_LENGTH

#define ELINKS_BROTLI_BUFFER_LENGTH   4096

Function Documentation

◆ brotli_close()

void brotli_close ( struct stream_encoded * stream)
static

◆ brotli_decode_buffer()

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

◆ brotli_open()

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

◆ brotli_read()

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

◆ get_brotli_version()

const char * get_brotli_version ( void )

Variable Documentation

◆ brotli_decoding_backend

const struct decoding_backend brotli_decoding_backend
Initial value:
= {
"brotli",
}
static int brotli_open(struct stream_encoded *stream, int fd)
Definition brotli.c:46
static int brotli_read(struct stream_encoded *stream, char *buf, int len)
Definition brotli.c:72
static void brotli_close(struct stream_encoded *stream)
Definition brotli.c:172
static char * brotli_decode_buffer(struct stream_encoded *st, char *datac, int len, int *new_len)
Definition brotli.c:124
static const char *const brotli_extensions[]
Definition brotli.c:203

◆ brotli_extensions

const char* const brotli_extensions[] = { ".br", NULL }
static