annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/lzma/delta.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /* SPDX-License-Identifier: 0BSD */
jpayne@69 2
jpayne@69 3 /**
jpayne@69 4 * \file lzma/delta.h
jpayne@69 5 * \brief Delta filter
jpayne@69 6 * \note Never include this file directly. Use <lzma.h> instead.
jpayne@69 7 */
jpayne@69 8
jpayne@69 9 /*
jpayne@69 10 * Author: Lasse Collin
jpayne@69 11 */
jpayne@69 12
jpayne@69 13 #ifndef LZMA_H_INTERNAL
jpayne@69 14 # error Never include this file directly. Use <lzma.h> instead.
jpayne@69 15 #endif
jpayne@69 16
jpayne@69 17
jpayne@69 18 /**
jpayne@69 19 * \brief Filter ID
jpayne@69 20 *
jpayne@69 21 * Filter ID of the Delta filter. This is used as lzma_filter.id.
jpayne@69 22 */
jpayne@69 23 #define LZMA_FILTER_DELTA LZMA_VLI_C(0x03)
jpayne@69 24
jpayne@69 25
jpayne@69 26 /**
jpayne@69 27 * \brief Type of the delta calculation
jpayne@69 28 *
jpayne@69 29 * Currently only byte-wise delta is supported. Other possible types could
jpayne@69 30 * be, for example, delta of 16/32/64-bit little/big endian integers, but
jpayne@69 31 * these are not currently planned since byte-wise delta is almost as good.
jpayne@69 32 */
jpayne@69 33 typedef enum {
jpayne@69 34 LZMA_DELTA_TYPE_BYTE
jpayne@69 35 } lzma_delta_type;
jpayne@69 36
jpayne@69 37
jpayne@69 38 /**
jpayne@69 39 * \brief Options for the Delta filter
jpayne@69 40 *
jpayne@69 41 * These options are needed by both encoder and decoder.
jpayne@69 42 */
jpayne@69 43 typedef struct {
jpayne@69 44 /** For now, this must always be LZMA_DELTA_TYPE_BYTE. */
jpayne@69 45 lzma_delta_type type;
jpayne@69 46
jpayne@69 47 /**
jpayne@69 48 * \brief Delta distance
jpayne@69 49 *
jpayne@69 50 * With the only currently supported type, LZMA_DELTA_TYPE_BYTE,
jpayne@69 51 * the distance is as bytes.
jpayne@69 52 *
jpayne@69 53 * Examples:
jpayne@69 54 * - 16-bit stereo audio: distance = 4 bytes
jpayne@69 55 * - 24-bit RGB image data: distance = 3 bytes
jpayne@69 56 */
jpayne@69 57 uint32_t dist;
jpayne@69 58
jpayne@69 59 /**
jpayne@69 60 * \brief Minimum value for lzma_options_delta.dist.
jpayne@69 61 */
jpayne@69 62 # define LZMA_DELTA_DIST_MIN 1
jpayne@69 63
jpayne@69 64 /**
jpayne@69 65 * \brief Maximum value for lzma_options_delta.dist.
jpayne@69 66 */
jpayne@69 67 # define LZMA_DELTA_DIST_MAX 256
jpayne@69 68
jpayne@69 69 /*
jpayne@69 70 * Reserved space to allow possible future extensions without
jpayne@69 71 * breaking the ABI. You should not touch these, because the names
jpayne@69 72 * of these variables may change. These are and will never be used
jpayne@69 73 * when type is LZMA_DELTA_TYPE_BYTE, so it is safe to leave these
jpayne@69 74 * uninitialized.
jpayne@69 75 */
jpayne@69 76
jpayne@69 77 /** \private Reserved member. */
jpayne@69 78 uint32_t reserved_int1;
jpayne@69 79
jpayne@69 80 /** \private Reserved member. */
jpayne@69 81 uint32_t reserved_int2;
jpayne@69 82
jpayne@69 83 /** \private Reserved member. */
jpayne@69 84 uint32_t reserved_int3;
jpayne@69 85
jpayne@69 86 /** \private Reserved member. */
jpayne@69 87 uint32_t reserved_int4;
jpayne@69 88
jpayne@69 89 /** \private Reserved member. */
jpayne@69 90 void *reserved_ptr1;
jpayne@69 91
jpayne@69 92 /** \private Reserved member. */
jpayne@69 93 void *reserved_ptr2;
jpayne@69 94
jpayne@69 95 } lzma_options_delta;