Changeset 4b0cd2f for libwandio/wandio.h


Ignore:
Timestamp:
06/30/14 13:20:00 (6 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
d19ff50
Parents:
3a3b661
Message:

Integrate lzma into libwandio properly

Update configure to detect lzma properly.
Add missing get_compression_type API function to wandio code.
Add code to detect if input file is LZMA.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libwandio/wandio.h

    rc7021d9 r4b0cd2f  
    6666
    6767/** Structure defining a supported compression method */
    68 struct compression_type {
     68struct wandio_compression_type {
    6969        /** Name of the compression method */
    7070        const char *name;
     
    7777
    7878/** The list of supported compression methods */
    79 extern struct compression_type compression_type[];
     79extern struct wandio_compression_type compression_type[];
    8080
    8181/** Structure defining a libtrace IO reader module */
     
    178178        /** LZO compression */
    179179        WANDIO_COMPRESS_LZO     = 3,
     180        /** LZMA compression */
     181        WANDIO_COMPRESS_LZMA    = 4,
    180182        /** All supported methods - used as a bitmask */
    181183        WANDIO_COMPRESS_MASK    = 7
     
    193195io_t *zlib_open(io_t *parent);
    194196io_t *thread_open(io_t *parent);
     197io_t *lzma_open(io_t *parent);
    195198io_t *peek_open(io_t *parent);
    196199io_t *stdio_open(const char *filename);
     
    199202iow_t *bz_wopen(iow_t *child, int compress_level);
    200203iow_t *lzo_wopen(iow_t *child, int compress_level);
     204iow_t *lzma_wopen(iow_t *child, int compress_level);
    201205iow_t *thread_wopen(iow_t *child);
    202206iow_t *stdio_wopen(const char *filename, int fileflags);
     
    211215 *
    212216 * @{ */
     217
     218/** Given a string describing the compression method, finds the internal
     219  * data structure representing that method. This is mostly useful for
     220  * nicely mapping a method name to the internal libwandio compression
     221  * method enum when configuring an output file.
     222  *
     223  * @param name          The compression method name as a string, e.g. "gzip",
     224  *                      "bzip2", "lzo" or "lzma".
     225  * @return A pointer to the compression_type structure representing the
     226  * compression method or NULL if no match can be found.
     227  *
     228  */
     229struct wandio_compression_type *wandio_lookup_compression_type(const char *name);
    213230
    214231/** Creates a new libtrace IO reader and opens the provided file for reading.
Note: See TracChangeset for help on using the changeset viewer.