]> icculus.org git repositories - icculus/xz.git/blob - src/liblzma/delta/delta_private.h
The LZMA2 decoder fix introduced a bug to LZ decoder,
[icculus/xz.git] / src / liblzma / delta / delta_private.h
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       delta_private.h
4 /// \brief      Private 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_PRIVATE_H
21 #define LZMA_DELTA_PRIVATE_H
22
23 #include "delta_common.h"
24
25 struct lzma_coder_s {
26         /// Next coder in the chain
27         lzma_next_coder next;
28
29         /// Delta distance
30         size_t distance;
31
32         /// Position in history[]
33         uint8_t pos;
34
35         /// Buffer to hold history of the original data
36         uint8_t history[LZMA_DELTA_DIST_MAX];
37 };
38
39
40 extern lzma_ret lzma_delta_coder_init(
41                 lzma_next_coder *next, lzma_allocator *allocator,
42                 const lzma_filter_info *filters, lzma_code_function code);
43
44 #endif