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

Data Structures

struct  lzma_enc_data

Macros

#define ELINKS_BZ_BUFFER_LENGTH   5000
#define ELINKS_LZMA_MEMORY_LIMIT   (1024 * 1024 * 128)

Functions

static int lzma_open (struct stream_encoded *stream, int fd)
static int lzma_read (struct stream_encoded *stream, char *buf, int len)
static char * lzma_decode_buffer (struct stream_encoded *st, char *data, int len, int *new_len)
static void lzma_close (struct stream_encoded *stream)
const char * get_lzma_version (void)

Variables

static const char *const lzma_extensions [] = { ".lzma", ".xz", NULL }
const struct decoding_backend lzma_decoding_backend

Macro Definition Documentation

◆ ELINKS_BZ_BUFFER_LENGTH

#define ELINKS_BZ_BUFFER_LENGTH   5000

◆ ELINKS_LZMA_MEMORY_LIMIT

#define ELINKS_LZMA_MEMORY_LIMIT   (1024 * 1024 * 128)

Function Documentation

◆ get_lzma_version()

const char * get_lzma_version ( void )

◆ lzma_close()

void lzma_close ( struct stream_encoded * stream)
static

◆ lzma_decode_buffer()

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

◆ lzma_open()

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

◆ lzma_read()

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

Variable Documentation

◆ lzma_decoding_backend

const struct decoding_backend lzma_decoding_backend
Initial value:
= {
"lzma",
}
static void lzma_close(struct stream_encoded *stream)
Definition lzma.c:163
static char * lzma_decode_buffer(struct stream_encoded *st, char *data, int len, int *new_len)
Definition lzma.c:110
static int lzma_read(struct stream_encoded *stream, char *buf, int len)
Definition lzma.c:63
static const char *const lzma_extensions[]
Definition lzma.c:185
static int lzma_open(struct stream_encoded *stream, int fd)
Definition lzma.c:36

◆ lzma_extensions

const char* const lzma_extensions[] = { ".lzma", ".xz", NULL }
static