nmsg 1.1.2
|
Compressed buffers. More...
Go to the source code of this file.
Functions | |
nmsg_zbuf_t | nmsg_zbuf_deflate_init (void) |
Initialize an nmsg_zbuf_t object for deflation. | |
nmsg_zbuf_t | nmsg_zbuf_inflate_init (void) |
Initialize an nmsg_zbuf_t object for inflation. | |
void | nmsg_zbuf_destroy (nmsg_zbuf_t *zb) |
Destroy all resources associated with an nmsg_zbuf_t object. | |
nmsg_res | nmsg_zbuf_deflate (nmsg_zbuf_t zb, size_t len, u_char *buf, size_t *z_len, u_char *z_buf) |
Deflate a buffer. | |
nmsg_res | nmsg_zbuf_inflate (nmsg_zbuf_t zb, size_t z_len, u_char *z_buf, size_t *u_len, u_char **u_buf) |
Inflate a buffer. | |
Compressed buffers.
Definition in file zbuf.h.
nmsg_zbuf_t nmsg_zbuf_deflate_init | ( | void | ) |
Initialize an nmsg_zbuf_t object for deflation.
nmsg_zbuf_t nmsg_zbuf_inflate_init | ( | void | ) |
Initialize an nmsg_zbuf_t object for inflation.
void nmsg_zbuf_destroy | ( | nmsg_zbuf_t * | zb | ) |
Destroy all resources associated with an nmsg_zbuf_t object.
[in] | zb | pointer to nmsg_zbuf_t object. |
nmsg_res nmsg_zbuf_deflate | ( | nmsg_zbuf_t | zb, |
size_t | len, | ||
u_char * | buf, | ||
size_t * | z_len, | ||
u_char * | z_buf | ||
) |
Deflate a buffer.
[in] | zb | nmsg_zbuf_t object initialized for deflation. |
[in] | len | length of buffer to compress. |
[in] | buf | buffer to compress. |
[out] | z_len | length of compressed buffer. |
[out] | z_buf | compressed buffer. Allocated by the caller and should be at least as large as 'buf'. |
nmsg_res nmsg_zbuf_inflate | ( | nmsg_zbuf_t | zb, |
size_t | z_len, | ||
u_char * | z_buf, | ||
size_t * | u_len, | ||
u_char ** | u_buf | ||
) |
Inflate a buffer.
[in] | zb | nmsg_zbuf_t object initialized for inflation. |
[in] | z_len | length of compressed buffer. |
[in] | z_buf | compressed buffer. |
[out] | u_len | length of uncompressed buffer. |
[out] | u_buf | pointer to uncompressed buffer. Should be freed by the caller with free(). |