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

Data Structures

struct  bz2_enc_data

Macros

#define ELINKS_BZ_BUFFER_LENGTH   BZ_MAX_UNUSED
#define BZIP2_SMALL   0

Functions

static int bzip2_open (struct stream_encoded *stream, int fd)
static int bzip2_read (struct stream_encoded *stream, char *buf, int len)
static char * bzip2_decode_buffer (struct stream_encoded *st, char *data, int len, int *new_len)
static void bzip2_close (struct stream_encoded *stream)
const char * get_bzip2_version (void)

Variables

static const char *const bzip2_extensions [] = { ".bz2", ".tbz", NULL }
const struct decoding_backend bzip2_decoding_backend

Macro Definition Documentation

◆ BZIP2_SMALL

#define BZIP2_SMALL   0

◆ ELINKS_BZ_BUFFER_LENGTH

#define ELINKS_BZ_BUFFER_LENGTH   BZ_MAX_UNUSED

Function Documentation

◆ bzip2_close()

void bzip2_close ( struct stream_encoded * stream)
static

◆ bzip2_decode_buffer()

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

◆ bzip2_open()

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

◆ bzip2_read()

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

◆ get_bzip2_version()

const char * get_bzip2_version ( void )

Variable Documentation

◆ bzip2_decoding_backend

const struct decoding_backend bzip2_decoding_backend
Initial value:
= {
"bzip2",
}
static int bzip2_open(struct stream_encoded *stream, int fd)
Definition bzip2.c:49
static char * bzip2_decode_buffer(struct stream_encoded *st, char *data, int len, int *new_len)
Definition bzip2.c:137
static void bzip2_close(struct stream_encoded *stream)
Definition bzip2.c:199
static int bzip2_read(struct stream_encoded *stream, char *buf, int len)
Definition bzip2.c:84
static const char *const bzip2_extensions[]
Definition bzip2.c:231

◆ bzip2_extensions

const char* const bzip2_extensions[] = { ".bz2", ".tbz", NULL }
static