Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../opt/saltstac.../salt/include
File: lzma.h
/**
[0] Fix | Delete
* \file api/lzma.h
[1] Fix | Delete
* \brief The public API of liblzma data compression library
[2] Fix | Delete
* \mainpage
[3] Fix | Delete
*
[4] Fix | Delete
* liblzma is a public domain general-purpose data compression library with
[5] Fix | Delete
* a zlib-like API. The native file format is .xz, but also the old .lzma
[6] Fix | Delete
* format and raw (no headers) streams are supported. Multiple compression
[7] Fix | Delete
* algorithms (filters) are supported. Currently LZMA2 is the primary filter.
[8] Fix | Delete
*
[9] Fix | Delete
* liblzma is part of XZ Utils <https://tukaani.org/xz/>. XZ Utils includes
[10] Fix | Delete
* a gzip-like command line tool named xz and some other tools. XZ Utils
[11] Fix | Delete
* is developed and maintained by Lasse Collin and Jia Tan.
[12] Fix | Delete
*
[13] Fix | Delete
* Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK
[14] Fix | Delete
* <https://7-zip.org/sdk.html>.
[15] Fix | Delete
*
[16] Fix | Delete
* The SHA-256 implementation is based on the public domain code found from
[17] Fix | Delete
* 7-Zip <https://7-zip.org/>, which has a modified version of the public
[18] Fix | Delete
* domain SHA-256 code found from Crypto++ <https://www.cryptopp.com/>.
[19] Fix | Delete
* The SHA-256 code in Crypto++ was written by Kevin Springle and Wei Dai.
[20] Fix | Delete
*/
[21] Fix | Delete
[22] Fix | Delete
/*
[23] Fix | Delete
* Author: Lasse Collin
[24] Fix | Delete
*
[25] Fix | Delete
* This file has been put into the public domain.
[26] Fix | Delete
* You can do whatever you want with this file.
[27] Fix | Delete
*/
[28] Fix | Delete
[29] Fix | Delete
#ifndef LZMA_H
[30] Fix | Delete
#define LZMA_H
[31] Fix | Delete
[32] Fix | Delete
/*****************************
[33] Fix | Delete
* Required standard headers *
[34] Fix | Delete
*****************************/
[35] Fix | Delete
[36] Fix | Delete
/*
[37] Fix | Delete
* liblzma API headers need some standard types and macros. To allow
[38] Fix | Delete
* including lzma.h without requiring the application to include other
[39] Fix | Delete
* headers first, lzma.h includes the required standard headers unless
[40] Fix | Delete
* they already seem to be included already or if LZMA_MANUAL_HEADERS
[41] Fix | Delete
* has been defined.
[42] Fix | Delete
*
[43] Fix | Delete
* Here's what types and macros are needed and from which headers:
[44] Fix | Delete
* - stddef.h: size_t, NULL
[45] Fix | Delete
* - stdint.h: uint8_t, uint32_t, uint64_t, UINT32_C(n), uint64_C(n),
[46] Fix | Delete
* UINT32_MAX, UINT64_MAX
[47] Fix | Delete
*
[48] Fix | Delete
* However, inttypes.h is a little more portable than stdint.h, although
[49] Fix | Delete
* inttypes.h declares some unneeded things compared to plain stdint.h.
[50] Fix | Delete
*
[51] Fix | Delete
* The hacks below aren't perfect, specifically they assume that inttypes.h
[52] Fix | Delete
* exists and that it typedefs at least uint8_t, uint32_t, and uint64_t,
[53] Fix | Delete
* and that, in case of incomplete inttypes.h, unsigned int is 32-bit.
[54] Fix | Delete
* If the application already takes care of setting up all the types and
[55] Fix | Delete
* macros properly (for example by using gnulib's stdint.h or inttypes.h),
[56] Fix | Delete
* we try to detect that the macros are already defined and don't include
[57] Fix | Delete
* inttypes.h here again. However, you may define LZMA_MANUAL_HEADERS to
[58] Fix | Delete
* force this file to never include any system headers.
[59] Fix | Delete
*
[60] Fix | Delete
* Some could argue that liblzma API should provide all the required types,
[61] Fix | Delete
* for example lzma_uint64, LZMA_UINT64_C(n), and LZMA_UINT64_MAX. This was
[62] Fix | Delete
* seen as an unnecessary mess, since most systems already provide all the
[63] Fix | Delete
* necessary types and macros in the standard headers.
[64] Fix | Delete
*
[65] Fix | Delete
* Note that liblzma API still has lzma_bool, because using stdbool.h would
[66] Fix | Delete
* break C89 and C++ programs on many systems. sizeof(bool) in C99 isn't
[67] Fix | Delete
* necessarily the same as sizeof(bool) in C++.
[68] Fix | Delete
*/
[69] Fix | Delete
[70] Fix | Delete
#ifndef LZMA_MANUAL_HEADERS
[71] Fix | Delete
/*
[72] Fix | Delete
* I suppose this works portably also in C++. Note that in C++,
[73] Fix | Delete
* we need to get size_t into the global namespace.
[74] Fix | Delete
*/
[75] Fix | Delete
# include <stddef.h>
[76] Fix | Delete
[77] Fix | Delete
/*
[78] Fix | Delete
* Skip inttypes.h if we already have all the required macros. If we
[79] Fix | Delete
* have the macros, we assume that we have the matching typedefs too.
[80] Fix | Delete
*/
[81] Fix | Delete
# if !defined(UINT32_C) || !defined(UINT64_C) \
[82] Fix | Delete
|| !defined(UINT32_MAX) || !defined(UINT64_MAX)
[83] Fix | Delete
/*
[84] Fix | Delete
* MSVC versions older than 2013 have no C99 support, and
[85] Fix | Delete
* thus they cannot be used to compile liblzma. Using an
[86] Fix | Delete
* existing liblzma.dll with old MSVC can work though(*),
[87] Fix | Delete
* but we need to define the required standard integer
[88] Fix | Delete
* types here in a MSVC-specific way.
[89] Fix | Delete
*
[90] Fix | Delete
* (*) If you do this, the existing liblzma.dll probably uses
[91] Fix | Delete
* a different runtime library than your MSVC-built
[92] Fix | Delete
* application. Mixing runtimes is generally bad, but
[93] Fix | Delete
* in this case it should work as long as you avoid
[94] Fix | Delete
* the few rarely-needed liblzma functions that allocate
[95] Fix | Delete
* memory and expect the caller to free it using free().
[96] Fix | Delete
*/
[97] Fix | Delete
# if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800
[98] Fix | Delete
typedef unsigned __int8 uint8_t;
[99] Fix | Delete
typedef unsigned __int32 uint32_t;
[100] Fix | Delete
typedef unsigned __int64 uint64_t;
[101] Fix | Delete
# else
[102] Fix | Delete
/* Use the standard inttypes.h. */
[103] Fix | Delete
# ifdef __cplusplus
[104] Fix | Delete
/*
[105] Fix | Delete
* C99 sections 7.18.2 and 7.18.4 specify
[106] Fix | Delete
* that C++ implementations define the limit
[107] Fix | Delete
* and constant macros only if specifically
[108] Fix | Delete
* requested. Note that if you want the
[109] Fix | Delete
* format macros (PRIu64 etc.) too, you need
[110] Fix | Delete
* to define __STDC_FORMAT_MACROS before
[111] Fix | Delete
* including lzma.h, since re-including
[112] Fix | Delete
* inttypes.h with __STDC_FORMAT_MACROS
[113] Fix | Delete
* defined doesn't necessarily work.
[114] Fix | Delete
*/
[115] Fix | Delete
# ifndef __STDC_LIMIT_MACROS
[116] Fix | Delete
# define __STDC_LIMIT_MACROS 1
[117] Fix | Delete
# endif
[118] Fix | Delete
# ifndef __STDC_CONSTANT_MACROS
[119] Fix | Delete
# define __STDC_CONSTANT_MACROS 1
[120] Fix | Delete
# endif
[121] Fix | Delete
# endif
[122] Fix | Delete
[123] Fix | Delete
# include <inttypes.h>
[124] Fix | Delete
# endif
[125] Fix | Delete
[126] Fix | Delete
/*
[127] Fix | Delete
* Some old systems have only the typedefs in inttypes.h, and
[128] Fix | Delete
* lack all the macros. For those systems, we need a few more
[129] Fix | Delete
* hacks. We assume that unsigned int is 32-bit and unsigned
[130] Fix | Delete
* long is either 32-bit or 64-bit. If these hacks aren't
[131] Fix | Delete
* enough, the application has to setup the types manually
[132] Fix | Delete
* before including lzma.h.
[133] Fix | Delete
*/
[134] Fix | Delete
# ifndef UINT32_C
[135] Fix | Delete
# if defined(_WIN32) && defined(_MSC_VER)
[136] Fix | Delete
# define UINT32_C(n) n ## UI32
[137] Fix | Delete
# else
[138] Fix | Delete
# define UINT32_C(n) n ## U
[139] Fix | Delete
# endif
[140] Fix | Delete
# endif
[141] Fix | Delete
[142] Fix | Delete
# ifndef UINT64_C
[143] Fix | Delete
# if defined(_WIN32) && defined(_MSC_VER)
[144] Fix | Delete
# define UINT64_C(n) n ## UI64
[145] Fix | Delete
# else
[146] Fix | Delete
/* Get ULONG_MAX. */
[147] Fix | Delete
# include <limits.h>
[148] Fix | Delete
# if ULONG_MAX == 4294967295UL
[149] Fix | Delete
# define UINT64_C(n) n ## ULL
[150] Fix | Delete
# else
[151] Fix | Delete
# define UINT64_C(n) n ## UL
[152] Fix | Delete
# endif
[153] Fix | Delete
# endif
[154] Fix | Delete
# endif
[155] Fix | Delete
[156] Fix | Delete
# ifndef UINT32_MAX
[157] Fix | Delete
# define UINT32_MAX (UINT32_C(4294967295))
[158] Fix | Delete
# endif
[159] Fix | Delete
[160] Fix | Delete
# ifndef UINT64_MAX
[161] Fix | Delete
# define UINT64_MAX (UINT64_C(18446744073709551615))
[162] Fix | Delete
# endif
[163] Fix | Delete
# endif
[164] Fix | Delete
#endif /* ifdef LZMA_MANUAL_HEADERS */
[165] Fix | Delete
[166] Fix | Delete
[167] Fix | Delete
/******************
[168] Fix | Delete
* LZMA_API macro *
[169] Fix | Delete
******************/
[170] Fix | Delete
[171] Fix | Delete
/*
[172] Fix | Delete
* Some systems require that the functions and function pointers are
[173] Fix | Delete
* declared specially in the headers. LZMA_API_IMPORT is for importing
[174] Fix | Delete
* symbols and LZMA_API_CALL is to specify the calling convention.
[175] Fix | Delete
*
[176] Fix | Delete
* By default it is assumed that the application will link dynamically
[177] Fix | Delete
* against liblzma. #define LZMA_API_STATIC in your application if you
[178] Fix | Delete
* want to link against static liblzma. If you don't care about portability
[179] Fix | Delete
* to operating systems like Windows, or at least don't care about linking
[180] Fix | Delete
* against static liblzma on them, don't worry about LZMA_API_STATIC. That
[181] Fix | Delete
* is, most developers will never need to use LZMA_API_STATIC.
[182] Fix | Delete
*
[183] Fix | Delete
* The GCC variants are a special case on Windows (Cygwin and MinGW).
[184] Fix | Delete
* We rely on GCC doing the right thing with its auto-import feature,
[185] Fix | Delete
* and thus don't use __declspec(dllimport). This way developers don't
[186] Fix | Delete
* need to worry about LZMA_API_STATIC. Also the calling convention is
[187] Fix | Delete
* omitted on Cygwin but not on MinGW.
[188] Fix | Delete
*/
[189] Fix | Delete
#ifndef LZMA_API_IMPORT
[190] Fix | Delete
# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
[191] Fix | Delete
# define LZMA_API_IMPORT __declspec(dllimport)
[192] Fix | Delete
# else
[193] Fix | Delete
# define LZMA_API_IMPORT
[194] Fix | Delete
# endif
[195] Fix | Delete
#endif
[196] Fix | Delete
[197] Fix | Delete
#ifndef LZMA_API_CALL
[198] Fix | Delete
# if defined(_WIN32) && !defined(__CYGWIN__)
[199] Fix | Delete
# define LZMA_API_CALL __cdecl
[200] Fix | Delete
# else
[201] Fix | Delete
# define LZMA_API_CALL
[202] Fix | Delete
# endif
[203] Fix | Delete
#endif
[204] Fix | Delete
[205] Fix | Delete
#ifndef LZMA_API
[206] Fix | Delete
# define LZMA_API(type) LZMA_API_IMPORT type LZMA_API_CALL
[207] Fix | Delete
#endif
[208] Fix | Delete
[209] Fix | Delete
[210] Fix | Delete
/***********
[211] Fix | Delete
* nothrow *
[212] Fix | Delete
***********/
[213] Fix | Delete
[214] Fix | Delete
/*
[215] Fix | Delete
* None of the functions in liblzma may throw an exception. Even
[216] Fix | Delete
* the functions that use callback functions won't throw exceptions,
[217] Fix | Delete
* because liblzma would break if a callback function threw an exception.
[218] Fix | Delete
*/
[219] Fix | Delete
#ifndef lzma_nothrow
[220] Fix | Delete
# if defined(__cplusplus)
[221] Fix | Delete
# if __cplusplus >= 201103L || (defined(_MSVC_LANG) \
[222] Fix | Delete
&& _MSVC_LANG >= 201103L)
[223] Fix | Delete
# define lzma_nothrow noexcept
[224] Fix | Delete
# else
[225] Fix | Delete
# define lzma_nothrow throw()
[226] Fix | Delete
# endif
[227] Fix | Delete
# elif defined(__GNUC__) && (__GNUC__ > 3 \
[228] Fix | Delete
|| (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
[229] Fix | Delete
# define lzma_nothrow __attribute__((__nothrow__))
[230] Fix | Delete
# else
[231] Fix | Delete
# define lzma_nothrow
[232] Fix | Delete
# endif
[233] Fix | Delete
#endif
[234] Fix | Delete
[235] Fix | Delete
[236] Fix | Delete
/********************
[237] Fix | Delete
* GNU C extensions *
[238] Fix | Delete
********************/
[239] Fix | Delete
[240] Fix | Delete
/*
[241] Fix | Delete
* GNU C extensions are used conditionally in the public API. It doesn't
[242] Fix | Delete
* break anything if these are sometimes enabled and sometimes not, only
[243] Fix | Delete
* affects warnings and optimizations.
[244] Fix | Delete
*/
[245] Fix | Delete
#if defined(__GNUC__) && __GNUC__ >= 3
[246] Fix | Delete
# ifndef lzma_attribute
[247] Fix | Delete
# define lzma_attribute(attr) __attribute__(attr)
[248] Fix | Delete
# endif
[249] Fix | Delete
[250] Fix | Delete
/* warn_unused_result was added in GCC 3.4. */
[251] Fix | Delete
# ifndef lzma_attr_warn_unused_result
[252] Fix | Delete
# if __GNUC__ == 3 && __GNUC_MINOR__ < 4
[253] Fix | Delete
# define lzma_attr_warn_unused_result
[254] Fix | Delete
# endif
[255] Fix | Delete
# endif
[256] Fix | Delete
[257] Fix | Delete
#else
[258] Fix | Delete
# ifndef lzma_attribute
[259] Fix | Delete
# define lzma_attribute(attr)
[260] Fix | Delete
# endif
[261] Fix | Delete
#endif
[262] Fix | Delete
[263] Fix | Delete
[264] Fix | Delete
#ifndef lzma_attr_pure
[265] Fix | Delete
# define lzma_attr_pure lzma_attribute((__pure__))
[266] Fix | Delete
#endif
[267] Fix | Delete
[268] Fix | Delete
#ifndef lzma_attr_const
[269] Fix | Delete
# define lzma_attr_const lzma_attribute((__const__))
[270] Fix | Delete
#endif
[271] Fix | Delete
[272] Fix | Delete
#ifndef lzma_attr_warn_unused_result
[273] Fix | Delete
# define lzma_attr_warn_unused_result \
[274] Fix | Delete
lzma_attribute((__warn_unused_result__))
[275] Fix | Delete
#endif
[276] Fix | Delete
[277] Fix | Delete
[278] Fix | Delete
/**************
[279] Fix | Delete
* Subheaders *
[280] Fix | Delete
**************/
[281] Fix | Delete
[282] Fix | Delete
#ifdef __cplusplus
[283] Fix | Delete
extern "C" {
[284] Fix | Delete
#endif
[285] Fix | Delete
[286] Fix | Delete
/*
[287] Fix | Delete
* Subheaders check that this is defined. It is to prevent including
[288] Fix | Delete
* them directly from applications.
[289] Fix | Delete
*/
[290] Fix | Delete
#define LZMA_H_INTERNAL 1
[291] Fix | Delete
[292] Fix | Delete
/* Basic features */
[293] Fix | Delete
#include "lzma/version.h"
[294] Fix | Delete
#include "lzma/base.h"
[295] Fix | Delete
#include "lzma/vli.h"
[296] Fix | Delete
#include "lzma/check.h"
[297] Fix | Delete
[298] Fix | Delete
/* Filters */
[299] Fix | Delete
#include "lzma/filter.h"
[300] Fix | Delete
#include "lzma/bcj.h"
[301] Fix | Delete
#include "lzma/delta.h"
[302] Fix | Delete
#include "lzma/lzma12.h"
[303] Fix | Delete
[304] Fix | Delete
/* Container formats */
[305] Fix | Delete
#include "lzma/container.h"
[306] Fix | Delete
[307] Fix | Delete
/* Advanced features */
[308] Fix | Delete
#include "lzma/stream_flags.h"
[309] Fix | Delete
#include "lzma/block.h"
[310] Fix | Delete
#include "lzma/index.h"
[311] Fix | Delete
#include "lzma/index_hash.h"
[312] Fix | Delete
[313] Fix | Delete
/* Hardware information */
[314] Fix | Delete
#include "lzma/hardware.h"
[315] Fix | Delete
[316] Fix | Delete
/*
[317] Fix | Delete
* All subheaders included. Undefine LZMA_H_INTERNAL to prevent applications
[318] Fix | Delete
* re-including the subheaders.
[319] Fix | Delete
*/
[320] Fix | Delete
#undef LZMA_H_INTERNAL
[321] Fix | Delete
[322] Fix | Delete
#ifdef __cplusplus
[323] Fix | Delete
}
[324] Fix | Delete
#endif
[325] Fix | Delete
[326] Fix | Delete
#endif /* ifndef LZMA_H */
[327] Fix | Delete
[328] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function