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

Data Structures

struct  zstd_enc_data
 

Macros

#define ZSTD_STATIC_LINKING_ONLY
 
#define ELINKS_ZSTD_BUFFER_LENGTH   16384
 

Functions

static int zstd_open (struct stream_encoded *stream, int fd)
 
static char * zstd_decode_buffer (struct stream_encoded *st, char *data, int len, int *new_len)
 
static int zstd_read (struct stream_encoded *stream, char *buf, int len)
 
static void zstd_close (struct stream_encoded *stream)
 
const char * get_zstd_version (void)
 

Variables

static const char *const zstd_extensions [] = { ".zst", NULL }
 
const struct decoding_backend zstd_decoding_backend
 

Macro Definition Documentation

◆ ELINKS_ZSTD_BUFFER_LENGTH

#define ELINKS_ZSTD_BUFFER_LENGTH   16384

◆ ZSTD_STATIC_LINKING_ONLY

#define ZSTD_STATIC_LINKING_ONLY

Function Documentation

◆ get_zstd_version()

const char * get_zstd_version ( void )

◆ zstd_close()

static void zstd_close ( struct stream_encoded * stream)
static

◆ zstd_decode_buffer()

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

◆ zstd_open()

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

◆ zstd_read()

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

Variable Documentation

◆ zstd_decoding_backend

const struct decoding_backend zstd_decoding_backend
Initial value:
= {
"zstd",
}
static int zstd_open(struct stream_encoded *stream, int fd)
Definition zstd.c:42
static int zstd_read(struct stream_encoded *stream, char *buf, int len)
Definition zstd.c:111
static char * zstd_decode_buffer(struct stream_encoded *st, char *data, int len, int *new_len)
Definition zstd.c:70
static const char *const zstd_extensions[]
Definition zstd.c:188
static void zstd_close(struct stream_encoded *stream)
Definition zstd.c:165

◆ zstd_extensions

const char* const zstd_extensions[] = { ".zst", NULL }
static