xref: /freebsd/contrib/xz/src/liblzma/delta/delta_private.h (revision 67be1e195acfaec99ce4fffeb17111ce085755f7)
1 // SPDX-License-Identifier: 0BSD
2 
3 ///////////////////////////////////////////////////////////////////////////////
4 //
5 /// \file       delta_private.h
6 /// \brief      Private common stuff for Delta encoder and decoder
7 //
8 //  Author:     Lasse Collin
9 //
10 ///////////////////////////////////////////////////////////////////////////////
11 
12 #ifndef LZMA_DELTA_PRIVATE_H
13 #define LZMA_DELTA_PRIVATE_H
14 
15 #include "delta_common.h"
16 
17 typedef struct {
18 	/// Next coder in the chain
19 	lzma_next_coder next;
20 
21 	/// Delta distance
22 	size_t distance;
23 
24 	/// Position in history[]
25 	uint8_t pos;
26 
27 	/// Buffer to hold history of the original data
28 	uint8_t history[LZMA_DELTA_DIST_MAX];
29 } lzma_delta_coder;
30 
31 
32 extern lzma_ret lzma_delta_coder_init(
33 		lzma_next_coder *next, const lzma_allocator *allocator,
34 		const lzma_filter_info *filters);
35 
36 #endif
37