]> icculus.org git repositories - icculus/xz.git/blob - src/liblzma/api/lzma/raw.h
Update the code to mostly match the new simpler file format
[icculus/xz.git] / src / liblzma / api / lzma / raw.h
1 /**
2  * \file        lzma/raw.h
3  * \brief       Raw encoder and decoder
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       Initializes raw encoder
26  *
27  * This function may be useful when implementing custom file formats.
28  *
29  * \param       strm    Pointer to properly prepared lzma_stream
30  * \param       options Array of lzma_options_filter structures.
31  *                      The end of the array must be marked with
32  *                      .id = LZMA_VLI_VALUE_UNKNOWN. The minimum
33  *                      number of filters is one and the maximum is four.
34  *
35  * The `action' with lzma_code() can be LZMA_RUN, LZMA_SYNC_FLUSH (if the
36  * filter chain supports it), or LZMA_FINISH.
37  *
38  * \return      - LZMA_OK
39  *              - LZMA_MEM_ERROR
40  *              - LZMA_HEADER_ERROR
41  *              - LZMA_PROG_ERROR
42  */
43 extern lzma_ret lzma_raw_encoder(
44                 lzma_stream *strm, const lzma_options_filter *options);
45
46
47 /**
48  * \brief       Initializes raw decoder
49  *
50  * The initialization of raw decoder goes similarly to raw encoder.
51  *
52  * The `action' with lzma_code() can be LZMA_RUN or LZMA_SYNC_FLUSH.
53  *
54  * \return      - LZMA_OK
55  *              - LZMA_MEM_ERROR
56  *              - LZMA_HEADER_ERROR
57  *              - LZMA_PROG_ERROR
58  */
59 extern lzma_ret lzma_raw_decoder(
60                 lzma_stream *strm, const lzma_options_filter *options);