Tor 0.4.9.0-alpha-dev
Functions
compress_none.c File Reference

Compression backend for identity compression. More...

#include "orconfig.h"
#include "lib/log/log.h"
#include "lib/compress/compress.h"
#include "lib/compress/compress_none.h"
#include "lib/intmath/cmp.h"
#include <string.h>

Go to the source code of this file.

Functions

tor_compress_output_t tor_cnone_compress_process (char **out, size_t *out_len, const char **in, size_t *in_len, int finish)
 

Detailed Description

Compression backend for identity compression.

We actually define this backend so that we can treat the identity transform as another case of compression.

This module should never be invoked directly. Use the compress module instead.

Definition in file compress_none.c.

Function Documentation

◆ tor_cnone_compress_process()

tor_compress_output_t tor_cnone_compress_process ( char **  out,
size_t *  out_len,
const char **  in,
size_t *  in_len,
int  finish 
)

Transfer some bytes using the identity transformation. Read up to *in_len bytes from *in, and write up to *out_len bytes to *out, adjusting the values as we go. If finish is true, we've reached the end of the input.

Return TOR_COMPRESS_DONE if we've finished the entire compression/decompression. Return TOR_COMPRESS_OK if we're processed everything from the input. Return TOR_COMPRESS_BUFFER_FULL if we're out of space on out. Return TOR_COMPRESS_ERROR if the stream is corrupt.

Definition at line 38 of file compress_none.c.