dax_encode - zip data for a specified codec
cc [ flag... ] file... -ldax [ library...] #include <dax.h> dax_result_t dax_encode(dax_context_t *ctx, dax_vec_t *src, void *buf, size_t *buflen, dax_zip_t *codec);
This function zips the data in src by using the specified codec and writes the code word stream to buf. The buflen parameter specifies the size of buf in bytes. It returns the number of bytes written to buf in buflen.
Returns the number of code words written to buf in the dax_result_t count field and sets the dax_result_t status field to one of the following values:
Operation completed successfully
Invalid argument for src
The calling thread did not create ctx
Output buffer overflow. Returns the required buffer size in buflen.
Some bytes in src->data have no matching symbol in codec, or the src->data is not compressible. buf may be modified.
See attributes(7) for descriptions of the following attributes:
|