ELinks 0.16.1.1
|
Data Structures | |
struct | stream_encoded |
struct | decoding_backend |
Typedefs | |
typedef unsigned char | stream_encoding_T |
Enumerations | |
enum | stream_encoding { ENCODING_NONE = 0 , ENCODING_GZIP , ENCODING_BZIP2 , ENCODING_LZMA , ENCODING_BROTLI , ENCODING_ZSTD , ENCODINGS_KNOWN } |
Functions | |
struct stream_encoded * | open_encoded (int, stream_encoding_T) |
int | read_encoded (struct stream_encoded *, char *, int) |
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 *) |
const char *const * | listext_encoded (stream_encoding_T) |
stream_encoding_T | guess_encoding (char *filename) |
const char * | get_encoding_name (stream_encoding_T encoding) |
struct connection_state | read_file (struct stream_encoded *stream, int readsize, struct string *page) |
Reads the file from stream in chunks of size readsize. | |
struct connection_state | read_encoded_file (struct string *filename, struct string *source) |
typedef unsigned char stream_encoding_T |
enum stream_encoding |
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 ) |
const char * get_encoding_name | ( | stream_encoding_T | encoding | ) |
stream_encoding_T guess_encoding | ( | char * | filename | ) |
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 * | source ) |
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.