dax_zip_get_contig - convert codec to byte stream
cc [ flag... ] file... -ldax [ library...] #include <dax.h> dax_status_t dax_zip_get_contig(dax_context_t *ctx, dax_zip_t *codec, void *buf, size_t *buflen);
This function converts codec to the byte stream format and writes it to buf. The byte stream format is described in the dax_zip_create_contig(3DAX) man page. buflen specifies the size of buf in bytes. To avoid the DAX_EOVERFLOW error condition, buflen must be at least the size specified by the max_zip_contig property as described in the dax_get_props(3DAX) man page. There is no alignment restriction on buf. It returns the number of bytes written to buf in buflen.
Operation completed successfully
The calling thread did not create ctx
Output buffer overflow. The required buffer size is returned in buflen.
With this function, you can write a compressed vector and its codec to a byte addressable storage, such as a file. Later, you can read the byte stream and recreate the dax_zip_t object by using the dax_zip_create_contig() function.
See attributes(5) for descriptions of the following attributes:
|
dax_zip(3DAX), dax_zip_create_contig(3DAX), libdax(3LIB)
Though the dax_zip_get_contig() function accepts a buf with any alignment, if you pass the same buf to the dax_zip_create_contig() function, it must be 16-byte aligned.