Tor 0.4.9.8
Loading...
Searching...
No Matches
compress_buf.c File Reference

Working with compressed data in buffers. More...

Go to the source code of this file.

Macros

#define BUFFERS_PRIVATE
 
#define check()
 

Functions

int buf_add_compress (buf_t *buf, tor_compress_state_t *state, const char *data, size_t data_len, const int done)
 

Detailed Description

Working with compressed data in buffers.

Definition in file compress_buf.c.

Macro Definition Documentation

◆ BUFFERS_PRIVATE

#define BUFFERS_PRIVATE

Definition at line 12 of file compress_buf.c.

◆ check

#define check ( )
Value:
#define STMT_NIL

Definition at line 23 of file compress_buf.c.

Function Documentation

◆ buf_add_compress()

int buf_add_compress ( buf_t * buf,
tor_compress_state_t * state,
const char * data,
size_t data_len,
const int done )

Compress or uncompress the data_len bytes in data using the compression state state, appending the result to buf. If done is true, flush the data in the state and finish the compression/uncompression. Return -1 on failure, 0 on success.

Definition at line 31 of file compress_buf.c.

Referenced by connection_write_to_buf_impl_().