]> icculus.org git repositories - icculus/xz.git/blob - src/liblzma/common/delta_common.h
Removed src/liblzma/common/sysdefs.h symlink, which was
[icculus/xz.git] / src / liblzma / common / delta_common.h
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       delta_common.h
4 /// \brief      Common stuff for Delta encoder and decoder
5 //
6 //  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
20 #ifndef LZMA_DELTA_COMMON_H
21 #define LZMA_DELTA_COMMON_H
22
23 #include "common.h"
24
25 struct lzma_coder_s {
26         /// Next coder in the chain
27         lzma_next_coder next;
28
29         /// Uncompressed size - This is needed when we are the last
30         /// filter in the chain.
31         lzma_vli uncompressed_size;
32
33         /// Delta distance
34         size_t distance;
35
36         /// Position in history[]
37         uint8_t pos;
38
39         /// Buffer to hold history of the original data
40         uint8_t history[LZMA_DELTA_DISTANCE_MAX];
41 };
42
43
44 extern lzma_ret lzma_delta_coder_init(
45                 lzma_next_coder *next, lzma_allocator *allocator,
46                 const lzma_filter_info *filters, lzma_code_function code);
47
48 #endif