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