RT-AC56 3.0.0.4.374.37 core
[tomato.git] / release / src-rt-6.x.4708 / tools / misc / xz / src / liblzma / api / lzma / delta.h
blob592fc4f8496ac653c446e4d94cdcc04a090daa6a
1 /**
2 * \file lzma/delta.h
3 * \brief Delta filter
4 */
6 /*
7 * Author: Lasse Collin
9 * This file has been put into the public domain.
10 * You can do whatever you want with this file.
12 * See ../lzma.h for information about liblzma as a whole.
15 #ifndef LZMA_H_INTERNAL
16 # error Never include this file directly. Use <lzma.h> instead.
17 #endif
20 /**
21 * \brief Filter ID
23 * Filter ID of the Delta filter. This is used as lzma_filter.id.
25 #define LZMA_FILTER_DELTA LZMA_VLI_C(0x03)
28 /**
29 * \brief Type of the delta calculation
31 * Currently only byte-wise delta is supported. Other possible types could
32 * be, for example, delta of 16/32/64-bit little/big endian integers, but
33 * these are not currently planned since byte-wise delta is almost as good.
35 typedef enum {
36 LZMA_DELTA_TYPE_BYTE
37 } lzma_delta_type;
40 /**
41 * \brief Options for the Delta filter
43 * These options are needed by both encoder and decoder.
45 typedef struct {
46 /** For now, this must always be LZMA_DELTA_TYPE_BYTE. */
47 lzma_delta_type type;
49 /**
50 * \brief Delta distance
52 * With the only currently supported type, LZMA_DELTA_TYPE_BYTE,
53 * the distance is as bytes.
55 * Examples:
56 * - 16-bit stereo audio: distance = 4 bytes
57 * - 24-bit RGB image data: distance = 3 bytes
59 uint32_t dist;
60 # define LZMA_DELTA_DIST_MIN 1
61 # define LZMA_DELTA_DIST_MAX 256
64 * Reserved space to allow possible future extensions without
65 * breaking the ABI. You should not touch these, because the names
66 * of these variables may change. These are and will never be used
67 * when type is LZMA_DELTA_TYPE_BYTE, so it is safe to leave these
68 * uninitialized.
70 uint32_t reserved_int1;
71 uint32_t reserved_int2;
72 uint32_t reserved_int3;
73 uint32_t reserved_int4;
74 void *reserved_ptr1;
75 void *reserved_ptr2;
77 } lzma_options_delta;