dax_zip_create(3dax) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

dax_zip_create(3dax)

dax_zip_create(3DAX)         DAX Library Functions        dax_zip_create(3DAX)

NAME
       dax_zip_create - create a codec from symbols

SYNOPSIS
       cc [ flag... ] file... -ldax [ library...]

       #include <dax.h>

       dax_status_t
       dax_zip_create(dax_context_t *ctx, uint16_t nsyms, uint8_t widths[],
           void *syms, dax_zip_t **codec);

DESCRIPTION
       This function creates a zip encoder/decoder for use in libdax functions
       that  zip and unzip data and returns it in codec. The number of symbols
       in the codec is nsyms, which may be any value from 1 to  1024  symbols.
       The   code   word   width   is  the  same  for  all  symbols,  and  has
       ceil(log2(nsyms)) bits.


       Each code word from 0 to 1023 represents a symbol with a width  ranging
       from  1 to 8 bytes. The symbol for code word i is hereafter referred to
       as symbol i. It reads the bytes of all symbols from syms, starting with
       the bytes of symbol 0 from its leftmost to rightmost bytes, followed by
       the bytes of symbol 1, and so on, with no padding or termination in be‐
       tween.


       widths is a vector of 4-bit values with 2 values packed per  byte.  Its
       element  number increases from high to low nibble within each byte, and
       from low to high address across bytes. The i^th element of widths gives
       the width in bytes of symbol i. The size  of  widths  is  ceil(nsyms/2)
       bytes. If nsyms is odd, the last nibble must be 0.


       The widths have the following constraints:

           o      Each width must be a value from 1 to 8 bytes.


           o      In  libdax  version  1,  for  i  from  0  to 255, width(i) +
                  width(i+256) + width(i+512) + width(i+768) <= 14. If an  in‐
                  dex exceeds nsyms - 1, the corresponding term is 0.


           o      In  libdax version 2, 2 + (nsyms + 1) / 2 + sum(syms widths)
                  <= 8192



       The libdax library only checks these conditions if the  DAX_DEBUG_EXTRA
       debug  option  is set. If violation of the conditions occur and are not
       checked, you will get undefined results.


       On return, the caller can change or free the data in  widths  and  syms
       without affecting the returned codec.

RETURN VALUES
       DAX_SUCCESS    Operation completed successfully


       DAX_EINVAL     Invalid argument


       DAX_ENOMEM     Memory resources are unavailable


       DAX_ETHREAD    The calling thread did not create ctx



USAGE
       This  function is useful for applications that need to derive their own
       encoding schemes, with different space and time requirements  and  com‐
       pression ratios than those provided by the dax_encode() function.

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Availabilitysystem/library _ Interface StabilityCommit‐
       ted


SEE ALSO
       dax_zip_free(3DAX), dax_zip_create_contig(3DAX), dax_zip(3DAX), dax_en‐
       code(3DAX), libdax(3LIB)

Oracle Solaris 11.4               17 Aug 2017             dax_zip_create(3DAX)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3