xref: /dflybsd-src/contrib/xz/src/liblzma/delta/delta_private.h (revision 46a2189dd86b644c3a76ac281d84b4182fd66b95)
12940b44dSPeter Avalos ///////////////////////////////////////////////////////////////////////////////
22940b44dSPeter Avalos //
32940b44dSPeter Avalos /// \file       delta_private.h
42940b44dSPeter Avalos /// \brief      Private common stuff for Delta encoder and decoder
52940b44dSPeter Avalos //
62940b44dSPeter Avalos //  Author:     Lasse Collin
72940b44dSPeter Avalos //
82940b44dSPeter Avalos //  This file has been put into the public domain.
92940b44dSPeter Avalos //  You can do whatever you want with this file.
102940b44dSPeter Avalos //
112940b44dSPeter Avalos ///////////////////////////////////////////////////////////////////////////////
122940b44dSPeter Avalos 
132940b44dSPeter Avalos #ifndef LZMA_DELTA_PRIVATE_H
142940b44dSPeter Avalos #define LZMA_DELTA_PRIVATE_H
152940b44dSPeter Avalos 
162940b44dSPeter Avalos #include "delta_common.h"
172940b44dSPeter Avalos 
18*46a2189dSzrj typedef struct {
192940b44dSPeter Avalos 	/// Next coder in the chain
202940b44dSPeter Avalos 	lzma_next_coder next;
212940b44dSPeter Avalos 
222940b44dSPeter Avalos 	/// Delta distance
232940b44dSPeter Avalos 	size_t distance;
242940b44dSPeter Avalos 
252940b44dSPeter Avalos 	/// Position in history[]
262940b44dSPeter Avalos 	uint8_t pos;
272940b44dSPeter Avalos 
282940b44dSPeter Avalos 	/// Buffer to hold history of the original data
292940b44dSPeter Avalos 	uint8_t history[LZMA_DELTA_DIST_MAX];
30*46a2189dSzrj } lzma_delta_coder;
312940b44dSPeter Avalos 
322940b44dSPeter Avalos 
332940b44dSPeter Avalos extern lzma_ret lzma_delta_coder_init(
3415ab8c86SJohn Marino 		lzma_next_coder *next, const lzma_allocator *allocator,
352940b44dSPeter Avalos 		const lzma_filter_info *filters);
362940b44dSPeter Avalos 
372940b44dSPeter Avalos #endif
38