ELinks 0.18.0
|
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "elinks.h"
#include "config/options.h"
#include "encoding/encoding.h"
#include "network/state.h"
#include "osdep/osdep.h"
#include "util/memory.h"
#include "util/string.h"
#include "encoding/brotli.h"
#include "encoding/bzip2.h"
#include "encoding/gzip.h"
#include "encoding/lzma.h"
#include "encoding/zstd.h"
Data Structures | |
struct | dummy_enc_data |
Functions | |
static int | dummy_open (struct stream_encoded *stream, int fd) |
static int | dummy_read (struct stream_encoded *stream, char *data, int len) |
static char * | dummy_decode_buffer (struct stream_encoded *stream, char *data, int len, int *new_len) |
static void | dummy_close (struct stream_encoded *stream) |
struct stream_encoded * | open_encoded (int fd, stream_encoding_T encoding) |
int | read_encoded (struct stream_encoded *stream, char *data, int len) |
char * | decode_encoded_buffer (struct stream_encoded *stream, stream_encoding_T encoding, char *data, int len, int *new_len) |
void | close_encoded (struct stream_encoded *stream) |
const char *const * | listext_encoded (stream_encoding_T encoding) |
stream_encoding_T | guess_encoding (char *filename) |
const char * | get_encoding_name (stream_encoding_T encoding) |
static stream_encoding_T | try_encoding_extensions (struct string *filename, int *fd) |
struct connection_state | read_file (struct stream_encoded *stream, int readsize, struct string *page) |
Reads the file from stream in chunks of size readsize. | |
static int | is_stdin_pipe (struct stat *stt, struct string *filename) |
struct connection_state | read_encoded_file (struct string *filename, struct string *page) |
Variables | |
static const char *const | dummy_extensions [] = { NULL } |
static const struct decoding_backend | dummy_decoding_backend |
static const struct decoding_backend *const | decoding_backends [] |
void close_encoded | ( | struct stream_encoded * | stream | ) |
char * decode_encoded_buffer | ( | struct stream_encoded * | stream, |
stream_encoding_T | encoding, | ||
char * | data, | ||
int | len, | ||
int * | new_len ) |
|
static |
|
static |
|
static |
|
static |
const char * get_encoding_name | ( | stream_encoding_T | encoding | ) |
stream_encoding_T guess_encoding | ( | char * | filename | ) |
|
inlinestatic |
const char *const * listext_encoded | ( | stream_encoding_T | encoding | ) |
struct stream_encoded * open_encoded | ( | int | fd, |
stream_encoding_T | encoding ) |
int read_encoded | ( | struct stream_encoded * | stream, |
char * | data, | ||
int | len ) |
struct connection_state read_encoded_file | ( | struct string * | filename, |
struct string * | page ) |
struct connection_state read_file | ( | struct stream_encoded * | stream, |
int | readsize, | ||
struct string * | page ) |
Reads the file from stream in chunks of size readsize.
stream should be in blocking mode. If it is in non-blocking mode, this function can return an empty string in page just because no more data is available yet, and the caller cannot know whether the true end of the stream has been reached.
|
inlinestatic |
|
static |
|
static |
|
static |