|
c-icap-doc
0.1
|
Utility functions. More...
Functions | |
| int | ci_base64_decode (const char *str, char *result, int len) |
| Decodes a base64 encoded string. More... | |
| int | ci_base64_encode (const unsigned char *data, size_t datalen, char *out, size_t outlen) |
| Produces a base64 encoded string. More... | |
| int | ci_encoding_method (const char *content_encoding) |
| Return the encoding method integer representation from string. More... | |
| int | ci_uncompress_preview (int compress_method, const char *buf, int len, char *unzipped_buf, int *unzipped_buf_len) |
| Uncompress a zipped string. More... | |
| const char * | ci_decompress_error (int err) |
| Return a string representation of a decompress error code. More... | |
| int | ci_decompress_to_membuf (int encoding_format, const char *inbuf, size_t inlen, struct ci_membuf *outbuf, ci_off_t max_size) |
| Uncompress any compressed data that c-icap understands and writes the output to the outbuf object, regardless of algorithm. More... | |
| int | ci_decompress_to_simple_file (int encoding_format, const char *inbuf, size_t inlen, struct ci_simple_file *outbuf, ci_off_t max_size) |
| int | ci_inflate_to_membuf (const char *inbuf, size_t inlen, struct ci_membuf *outbuf, ci_off_t max_size) |
| Uncompress deflate/gzip compressed data and writes the output to the outbuf object. More... | |
| int | ci_inflate_to_simple_file (const char *inbuf, size_t inlen, struct ci_simple_file *outbuf, ci_off_t max_size) |
| int | ci_bzunzip_to_membuf (const char *inbuf, size_t inlen, struct ci_membuf *outbuf, ci_off_t max_size) |
| Uncompress bzip2 compressed data and writes the output to the outbuf object. More... | |
| int | ci_bzunzip_to_simple_file (const char *inbuf, size_t inlen, struct ci_simple_file *outbuf, ci_off_t max_size) |
| int | ci_brinflate_to_membuf (const char *inbuf, size_t inlen, struct ci_membuf *outbuf, ci_off_t max_size) |
| Uncompress brotli compressed data and writes the output to the outbuf object. More... | |
| int | ci_brinflate_to_simple_file (const char *inbuf, size_t inlen, struct ci_simple_file *outbuf, ci_off_t max_size) |
| int | ci_compress_to_membuf (int encoding_format, const char *inbuf, size_t inlen, struct ci_membuf *outbuf, ci_off_t max_size) |
| Compress any uncompressed data that c-icap understands and writes the output to the outbuf object, regardless of algorithm. More... | |
| int | ci_compress_to_simple_file (int encoding_format, const char *inbuf, size_t inlen, struct ci_simple_file *outbuf, ci_off_t max_size) |
| int | ci_deflate_to_membuf (const char *inbuf, size_t inlen, struct ci_membuf *outbuf, ci_off_t max_size) |
| Compress deflate uncompressed data and writes the output to the outbuf object. More... | |
| int | ci_deflate_to_simple_file (const char *inbuf, size_t inlen, struct ci_simple_file *outbuf, ci_off_t max_size) |
| int | ci_gzip_to_membuf (const char *inbuf, size_t inlen, struct ci_membuf *outbuf, ci_off_t max_size) |
| Compress gzip uncompressed data and writes the output to the outbuf object. More... | |
| int | ci_gzip_to_simple_file (const char *inbuf, size_t inlen, struct ci_simple_file *outbuf, ci_off_t max_size) |
| int | ci_bzzip_to_membuf (const char *inbuf, size_t inlen, struct ci_membuf *outbuf, ci_off_t max_size) |
| Compress bzip2 uncompressed data and writes the output to the outbuf object. More... | |
| int | ci_bzzip_to_simple_file (const char *inbuf, size_t inlen, struct ci_simple_file *outbuf, ci_off_t max_size) |
| int | ci_brdeflate_to_membuf (const char *inbuf, size_t inlen, struct ci_membuf *outbuf, ci_off_t max_size) |
| Compress brotli uncompressed data and writes the output to the outbuf object. More... | |
| int | ci_brdeflate_to_simple_file (const char *inbuf, size_t inlen, struct ci_simple_file *outbuf, ci_off_t max_size) |
| char * | ci_base64_decode_dup (const char *str) |
| Decodes a base64 encoded string, and also allocate memory for the result. More... | |
| int | ci_http_response_content_encoding (ci_request_t *req) |
| Return the encoding method integer representation from string. More... | |
Utility functions.
| int ci_base64_decode | ( | const char * | str, |
| char * | result, | ||
| int | len | ||
| ) |
Decodes a base64 encoded string.
| str | is a buffer which holds the base64 encoded data |
| result | is a buffer where the decoded data will be stored |
| len | is the length of the result buffer |
| char* ci_base64_decode_dup | ( | const char * | str | ) |
Decodes a base64 encoded string, and also allocate memory for the result.
| str | is a buffer which holds the base64 encoded data |
| int ci_base64_encode | ( | const unsigned char * | data, |
| size_t | datalen, | ||
| char * | out, | ||
| size_t | outlen | ||
| ) |
Produces a base64 encoded string.
| data | is a buffer which holds the data to be encoded |
| datalen | is the length of the data buffer |
| out | is a buffer where the encoded data will be stored |
| outlen | is the length of the out buffer |
| int ci_brdeflate_to_membuf | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_membuf * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
Compress brotli uncompressed data and writes the output to the outbuf object.
| inbuf | is a buffer which holds the unzipped data |
| inlen | is the length of the buffer buf |
| outbuf | where to put zipped data |
| max_size | if it is greater than zero, the output data limit |
| int ci_brdeflate_to_simple_file | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_simple_file * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
| int ci_brinflate_to_membuf | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_membuf * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
Uncompress brotli compressed data and writes the output to the outbuf object.
| inbuf | is a buffer which holds the zipped data |
| inlen | is the length of the buffer buf |
| outbuf | where to put unzipped data |
| max_size | if it is greater than zero, the output data limit |
| int ci_brinflate_to_simple_file | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_simple_file * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
| int ci_bzunzip_to_membuf | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_membuf * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
Uncompress bzip2 compressed data and writes the output to the outbuf object.
| inbuf | is a buffer which holds the zipped data |
| inlen | is the length of the buffer buf |
| outbuf | where to put unzipped data |
| max_size | if it is greater than zero, the output data limit |
| int ci_bzunzip_to_simple_file | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_simple_file * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
| int ci_bzzip_to_membuf | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_membuf * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
Compress bzip2 uncompressed data and writes the output to the outbuf object.
| inbuf | is a buffer which holds the unzipped data |
| inlen | is the length of the buffer buf |
| outbuf | where to put zipped data |
| max_size | if it is greater than zero, the output data limit |
| int ci_bzzip_to_simple_file | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_simple_file * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
| int ci_compress_to_membuf | ( | int | encoding_format, |
| const char * | inbuf, | ||
| size_t | inlen, | ||
| struct ci_membuf * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
Compress any uncompressed data that c-icap understands and writes the output to the outbuf object, regardless of algorithm.
| encoding_format | is the enum for the encoding type |
| inbuf | is a buffer which holds the unzipped data |
| inlen | is the length of the buffer buf |
| outbuf | where to put zipped data |
| max_size | if it is greater than zero, the output data limit |
| int ci_compress_to_simple_file | ( | int | encoding_format, |
| const char * | inbuf, | ||
| size_t | inlen, | ||
| struct ci_simple_file * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
| const char* ci_decompress_error | ( | int | err | ) |
Return a string representation of a decompress error code.
| err | a CI_UNCOMPRESS_ERRORS error code |
| int ci_decompress_to_membuf | ( | int | encoding_format, |
| const char * | inbuf, | ||
| size_t | inlen, | ||
| struct ci_membuf * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
Uncompress any compressed data that c-icap understands and writes the output to the outbuf object, regardless of algorithm.
| encoding_format | is the enum for the encoding type |
| inbuf | is a buffer which holds the zipped data |
| inlen | is the length of the buffer buf |
| outbuf | where to put unzipped data |
| max_size | if it is greater than zero, the output data limit |
| int ci_decompress_to_simple_file | ( | int | encoding_format, |
| const char * | inbuf, | ||
| size_t | inlen, | ||
| struct ci_simple_file * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
| int ci_deflate_to_membuf | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_membuf * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
Compress deflate uncompressed data and writes the output to the outbuf object.
| inbuf | is a buffer which holds the unzipped data |
| inlen | is the length of the buffer buf |
| outbuf | where to put zipped data |
| max_size | if it is greater than zero, the output data limit |
| int ci_deflate_to_simple_file | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_simple_file * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
| int ci_encoding_method | ( | const char * | content_encoding | ) |
Return the encoding method integer representation from string.
| content_encoding | The content encoding name |
| int ci_gzip_to_membuf | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_membuf * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
Compress gzip uncompressed data and writes the output to the outbuf object.
| inbuf | is a buffer which holds the unzipped data |
| inlen | is the length of the buffer buf |
| outbuf | where to put zipped data |
| max_size | if it is greater than zero, the output data limit |
| int ci_gzip_to_simple_file | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_simple_file * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
| int ci_http_response_content_encoding | ( | ci_request_t * | req | ) |
Return the encoding method integer representation from string.
| req | is a pointer to the current ICAP request object. |
| int ci_inflate_to_membuf | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_membuf * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
Uncompress deflate/gzip compressed data and writes the output to the outbuf object.
| inbuf | is a buffer which holds the zipped data |
| inlen | is the length of the buffer buf |
| outbuf | where to put unzipped data |
| max_size | if it is greater than zero, the output data limit |
| int ci_inflate_to_simple_file | ( | const char * | inbuf, |
| size_t | inlen, | ||
| struct ci_simple_file * | outbuf, | ||
| ci_off_t | max_size | ||
| ) |
| int ci_uncompress_preview | ( | int | compress_method, |
| const char * | buf, | ||
| int | len, | ||
| char * | unzipped_buf, | ||
| int * | unzipped_buf_len | ||
| ) |
Uncompress a zipped string.
| compress_method | CI_ENCODE_GZIP, CI_ENCODED_DEFLATE or CI_CI_ENCODE_BZIP2 |
| buf | is a buffer which holds the zipped data |
| len | is the length of the buffer buf |
| unzipped_buf | is the buffer where to store unzipped data |
| unzipped_buf_len | is the length of the buffer to store unzipped data, and updated with the length of unzipped data |
1.8.5