Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
decode.h File Reference
#include "../dlib/dlib.h"
Include dependency graph for decode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Decode
 
struct  DecodeTransfer
 

Typedefs

typedef struct Decode Decode
 
typedef struct DecodeTransfer DecodeTransfer
 

Functions

DecodeTransfera_Decode_transfer_init (const char *format)
 Initialize transfer decoder.
 
Dstra_Decode_transfer_process (DecodeTransfer *dc, const char *instr, int inlen)
 Decode 'Transfer-Encoding: chunked' data.
 
bool_t a_Decode_transfer_finished (DecodeTransfer *dc)
 
void a_Decode_transfer_free (DecodeTransfer *dc)
 
Decodea_Decode_content_init (const char *format)
 Initialize content decoder.
 
Decodea_Decode_charset_init (const char *format)
 Initialize decoder to translate from any character set known to iconv() to UTF-8.
 
Dstra_Decode_process (Decode *dc, const char *instr, int inlen)
 Decode data.
 
void a_Decode_free (Decode *dc)
 

Typedef Documentation

◆ Decode

typedef struct Decode Decode

◆ DecodeTransfer

Function Documentation

◆ a_Decode_charset_init()

Decode * a_Decode_charset_init ( const char *  format)

Initialize decoder to translate from any character set known to iconv() to UTF-8.

GNU iconv(1) will provide a list of known character sets if invoked with the "--list" flag.

Definition at line 365 of file decode.c.

References Decode::buffer, bufsize, Decode::decode, Decode_charset(), Decode_charset_free(), dNew, dStr_new(), dStrAsciiCasecmp(), Decode::free, Decode::leftover, MSG_WARN, and Decode::state.

Referenced by a_Cache_set_content_type().

◆ a_Decode_content_init()

Decode * a_Decode_content_init ( const char *  format)

Initialize content decoder.

Currently handles 'gzip' and 'deflate'.

Definition at line 327 of file decode.c.

References _MSG, Decode::decode, Decode_content_init_common(), Decode_deflate(), Decode_gzip(), dStrAsciiCasecmp(), MSG, and Decode::state.

Referenced by Cache_parse_header().

◆ a_Decode_free()

void a_Decode_free ( Decode dc)

Definition at line 400 of file decode.c.

References dFree(), and Decode::free.

Referenced by a_Cache_set_content_type(), Cache_entry_free(), and Cache_finish_msg().

◆ a_Decode_process()

Dstr * a_Decode_process ( Decode dc,
const char *  instr,
int  inlen 
)

Decode data.

Definition at line 392 of file decode.c.

References Decode::decode.

Referenced by a_Cache_process_dbuf(), and Cache_ref_data().

◆ a_Decode_transfer_finished()

bool_t a_Decode_transfer_finished ( DecodeTransfer dc)

Definition at line 85 of file decode.c.

References DecodeTransfer::finished.

Referenced by a_Cache_process_dbuf().

◆ a_Decode_transfer_free()

void a_Decode_transfer_free ( DecodeTransfer dc)

Definition at line 90 of file decode.c.

References dFree(), dStr_free(), DecodeTransfer::leftover, and DecodeTransfer::state.

Referenced by Cache_entry_free(), and Cache_finish_msg().

◆ a_Decode_transfer_init()

DecodeTransfer * a_Decode_transfer_init ( const char *  format)

Initialize transfer decoder.

Currently handles "chunked".

Definition at line 291 of file decode.c.

References _MSG, dNew, dStr_new(), dStrAsciiCasecmp(), FALSE, DecodeTransfer::finished, DecodeTransfer::leftover, and DecodeTransfer::state.

Referenced by Cache_parse_header().

◆ a_Decode_transfer_process()

Dstr * a_Decode_transfer_process ( DecodeTransfer dc,
const char *  instr,
int  inlen 
)

Decode 'Transfer-Encoding: chunked' data.

Definition at line 26 of file decode.c.

References dStr_append_l(), dStr_erase(), dStr_sized_new(), DecodeTransfer::finished, DecodeTransfer::leftover, Dstr::len, MIN, DecodeTransfer::state, Dstr::str, and TRUE.

Referenced by a_Cache_process_dbuf().