]> icculus.org git repositories - icculus/xz.git/blob - src/liblzma/api/lzma/auto.h
Imported to git.
[icculus/xz.git] / src / liblzma / api / lzma / auto.h
1 /**
2  * \file        lzma/auto.h
3  * \brief       Decoder with automatic file format detection
4  *
5  * \author      Copyright (C) 1999-2006 Igor Pavlov
6  * \author      Copyright (C) 2007 Lasse Collin
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  */
18
19 #ifndef LZMA_H_INTERNAL
20 #       error Never include this file directly. Use <lzma.h> instead.
21 #endif
22
23
24 /**
25  * \brief       Decode .lzma Streams and LZMA_Alone files with autodetection
26  *
27  * Autodetects between the .lzma Stream and LZMA_Alone formats, and
28  * calls lzma_stream_decoder_init() or lzma_alone_decoder_init() once
29  * the type of the file has been detected.
30  *
31  * \param       strm        Pointer to propertily prepared lzma_stream
32  * \param       header      Pointer to hold a pointer to Extra Records read
33  *                          from the Header Metadata Block. Use NULL if
34  *                          you don't care about Extra Records.
35  * \param       footer      Same as header, but for Footer Metadata Block.
36  *
37  * \return      - LZMA_OK: Initialization was successful.
38  *              - LZMA_MEM_ERROR: Cannot allocate memory.
39  */
40 extern lzma_ret lzma_auto_decoder(lzma_stream *strm,
41                 lzma_extra **header, lzma_extra **footer);