Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/lzma
File: container.h
/**
[0] Fix | Delete
* \file lzma/container.h
[1] Fix | Delete
* \brief File formats
[2] Fix | Delete
*/
[3] Fix | Delete
[4] Fix | Delete
/*
[5] Fix | Delete
* Author: Lasse Collin
[6] Fix | Delete
*
[7] Fix | Delete
* This file has been put into the public domain.
[8] Fix | Delete
* You can do whatever you want with this file.
[9] Fix | Delete
*
[10] Fix | Delete
* See ../lzma.h for information about liblzma as a whole.
[11] Fix | Delete
*/
[12] Fix | Delete
[13] Fix | Delete
#ifndef LZMA_H_INTERNAL
[14] Fix | Delete
# error Never include this file directly. Use <lzma.h> instead.
[15] Fix | Delete
#endif
[16] Fix | Delete
[17] Fix | Delete
[18] Fix | Delete
/************
[19] Fix | Delete
* Encoding *
[20] Fix | Delete
************/
[21] Fix | Delete
[22] Fix | Delete
/**
[23] Fix | Delete
* \brief Default compression preset
[24] Fix | Delete
*
[25] Fix | Delete
* It's not straightforward to recommend a default preset, because in some
[26] Fix | Delete
* cases keeping the resource usage relatively low is more important that
[27] Fix | Delete
* getting the maximum compression ratio.
[28] Fix | Delete
*/
[29] Fix | Delete
#define LZMA_PRESET_DEFAULT UINT32_C(6)
[30] Fix | Delete
[31] Fix | Delete
[32] Fix | Delete
/**
[33] Fix | Delete
* \brief Mask for preset level
[34] Fix | Delete
*
[35] Fix | Delete
* This is useful only if you need to extract the level from the preset
[36] Fix | Delete
* variable. That should be rare.
[37] Fix | Delete
*/
[38] Fix | Delete
#define LZMA_PRESET_LEVEL_MASK UINT32_C(0x1F)
[39] Fix | Delete
[40] Fix | Delete
[41] Fix | Delete
/*
[42] Fix | Delete
* Preset flags
[43] Fix | Delete
*
[44] Fix | Delete
* Currently only one flag is defined.
[45] Fix | Delete
*/
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* \brief Extreme compression preset
[49] Fix | Delete
*
[50] Fix | Delete
* This flag modifies the preset to make the encoding significantly slower
[51] Fix | Delete
* while improving the compression ratio only marginally. This is useful
[52] Fix | Delete
* when you don't mind wasting time to get as small result as possible.
[53] Fix | Delete
*
[54] Fix | Delete
* This flag doesn't affect the memory usage requirements of the decoder (at
[55] Fix | Delete
* least not significantly). The memory usage of the encoder may be increased
[56] Fix | Delete
* a little but only at the lowest preset levels (0-3).
[57] Fix | Delete
*/
[58] Fix | Delete
#define LZMA_PRESET_EXTREME (UINT32_C(1) << 31)
[59] Fix | Delete
[60] Fix | Delete
[61] Fix | Delete
/**
[62] Fix | Delete
* \brief Multithreading options
[63] Fix | Delete
*/
[64] Fix | Delete
typedef struct {
[65] Fix | Delete
/**
[66] Fix | Delete
* \brief Flags
[67] Fix | Delete
*
[68] Fix | Delete
* Set this to zero if no flags are wanted.
[69] Fix | Delete
*
[70] Fix | Delete
* No flags are currently supported.
[71] Fix | Delete
*/
[72] Fix | Delete
uint32_t flags;
[73] Fix | Delete
[74] Fix | Delete
/**
[75] Fix | Delete
* \brief Number of worker threads to use
[76] Fix | Delete
*/
[77] Fix | Delete
uint32_t threads;
[78] Fix | Delete
[79] Fix | Delete
/**
[80] Fix | Delete
* \brief Maximum uncompressed size of a Block
[81] Fix | Delete
*
[82] Fix | Delete
* The encoder will start a new .xz Block every block_size bytes.
[83] Fix | Delete
* Using LZMA_FULL_FLUSH or LZMA_FULL_BARRIER with lzma_code()
[84] Fix | Delete
* the caller may tell liblzma to start a new Block earlier.
[85] Fix | Delete
*
[86] Fix | Delete
* With LZMA2, a recommended block size is 2-4 times the LZMA2
[87] Fix | Delete
* dictionary size. With very small dictionaries, it is recommended
[88] Fix | Delete
* to use at least 1 MiB block size for good compression ratio, even
[89] Fix | Delete
* if this is more than four times the dictionary size. Note that
[90] Fix | Delete
* these are only recommendations for typical use cases; feel free
[91] Fix | Delete
* to use other values. Just keep in mind that using a block size
[92] Fix | Delete
* less than the LZMA2 dictionary size is waste of RAM.
[93] Fix | Delete
*
[94] Fix | Delete
* Set this to 0 to let liblzma choose the block size depending
[95] Fix | Delete
* on the compression options. For LZMA2 it will be 3*dict_size
[96] Fix | Delete
* or 1 MiB, whichever is more.
[97] Fix | Delete
*
[98] Fix | Delete
* For each thread, about 3 * block_size bytes of memory will be
[99] Fix | Delete
* allocated. This may change in later liblzma versions. If so,
[100] Fix | Delete
* the memory usage will probably be reduced, not increased.
[101] Fix | Delete
*/
[102] Fix | Delete
uint64_t block_size;
[103] Fix | Delete
[104] Fix | Delete
/**
[105] Fix | Delete
* \brief Timeout to allow lzma_code() to return early
[106] Fix | Delete
*
[107] Fix | Delete
* Multithreading can make liblzma to consume input and produce
[108] Fix | Delete
* output in a very bursty way: it may first read a lot of input
[109] Fix | Delete
* to fill internal buffers, then no input or output occurs for
[110] Fix | Delete
* a while.
[111] Fix | Delete
*
[112] Fix | Delete
* In single-threaded mode, lzma_code() won't return until it has
[113] Fix | Delete
* either consumed all the input or filled the output buffer. If
[114] Fix | Delete
* this is done in multithreaded mode, it may cause a call
[115] Fix | Delete
* lzma_code() to take even tens of seconds, which isn't acceptable
[116] Fix | Delete
* in all applications.
[117] Fix | Delete
*
[118] Fix | Delete
* To avoid very long blocking times in lzma_code(), a timeout
[119] Fix | Delete
* (in milliseconds) may be set here. If lzma_code() would block
[120] Fix | Delete
* longer than this number of milliseconds, it will return with
[121] Fix | Delete
* LZMA_OK. Reasonable values are 100 ms or more. The xz command
[122] Fix | Delete
* line tool uses 300 ms.
[123] Fix | Delete
*
[124] Fix | Delete
* If long blocking times are fine for you, set timeout to a special
[125] Fix | Delete
* value of 0, which will disable the timeout mechanism and will make
[126] Fix | Delete
* lzma_code() block until all the input is consumed or the output
[127] Fix | Delete
* buffer has been filled.
[128] Fix | Delete
*
[129] Fix | Delete
* \note Even with a timeout, lzma_code() might sometimes take
[130] Fix | Delete
* somewhat long time to return. No timing guarantees
[131] Fix | Delete
* are made.
[132] Fix | Delete
*/
[133] Fix | Delete
uint32_t timeout;
[134] Fix | Delete
[135] Fix | Delete
/**
[136] Fix | Delete
* \brief Compression preset (level and possible flags)
[137] Fix | Delete
*
[138] Fix | Delete
* The preset is set just like with lzma_easy_encoder().
[139] Fix | Delete
* The preset is ignored if filters below is non-NULL.
[140] Fix | Delete
*/
[141] Fix | Delete
uint32_t preset;
[142] Fix | Delete
[143] Fix | Delete
/**
[144] Fix | Delete
* \brief Filter chain (alternative to a preset)
[145] Fix | Delete
*
[146] Fix | Delete
* If this is NULL, the preset above is used. Otherwise the preset
[147] Fix | Delete
* is ignored and the filter chain specified here is used.
[148] Fix | Delete
*/
[149] Fix | Delete
const lzma_filter *filters;
[150] Fix | Delete
[151] Fix | Delete
/**
[152] Fix | Delete
* \brief Integrity check type
[153] Fix | Delete
*
[154] Fix | Delete
* See check.h for available checks. The xz command line tool
[155] Fix | Delete
* defaults to LZMA_CHECK_CRC64, which is a good choice if you
[156] Fix | Delete
* are unsure.
[157] Fix | Delete
*/
[158] Fix | Delete
lzma_check check;
[159] Fix | Delete
[160] Fix | Delete
/*
[161] Fix | Delete
* Reserved space to allow possible future extensions without
[162] Fix | Delete
* breaking the ABI. You should not touch these, because the names
[163] Fix | Delete
* of these variables may change. These are and will never be used
[164] Fix | Delete
* with the currently supported options, so it is safe to leave these
[165] Fix | Delete
* uninitialized.
[166] Fix | Delete
*/
[167] Fix | Delete
lzma_reserved_enum reserved_enum1;
[168] Fix | Delete
lzma_reserved_enum reserved_enum2;
[169] Fix | Delete
lzma_reserved_enum reserved_enum3;
[170] Fix | Delete
uint32_t reserved_int1;
[171] Fix | Delete
uint32_t reserved_int2;
[172] Fix | Delete
uint32_t reserved_int3;
[173] Fix | Delete
uint32_t reserved_int4;
[174] Fix | Delete
uint64_t reserved_int5;
[175] Fix | Delete
uint64_t reserved_int6;
[176] Fix | Delete
uint64_t reserved_int7;
[177] Fix | Delete
uint64_t reserved_int8;
[178] Fix | Delete
void *reserved_ptr1;
[179] Fix | Delete
void *reserved_ptr2;
[180] Fix | Delete
void *reserved_ptr3;
[181] Fix | Delete
void *reserved_ptr4;
[182] Fix | Delete
[183] Fix | Delete
} lzma_mt;
[184] Fix | Delete
[185] Fix | Delete
[186] Fix | Delete
/**
[187] Fix | Delete
* \brief Calculate approximate memory usage of easy encoder
[188] Fix | Delete
*
[189] Fix | Delete
* This function is a wrapper for lzma_raw_encoder_memusage().
[190] Fix | Delete
*
[191] Fix | Delete
* \param preset Compression preset (level and possible flags)
[192] Fix | Delete
*
[193] Fix | Delete
* \return Number of bytes of memory required for the given
[194] Fix | Delete
* preset when encoding. If an error occurs, for example
[195] Fix | Delete
* due to unsupported preset, UINT64_MAX is returned.
[196] Fix | Delete
*/
[197] Fix | Delete
extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
[198] Fix | Delete
lzma_nothrow lzma_attr_pure;
[199] Fix | Delete
[200] Fix | Delete
[201] Fix | Delete
/**
[202] Fix | Delete
* \brief Calculate approximate decoder memory usage of a preset
[203] Fix | Delete
*
[204] Fix | Delete
* This function is a wrapper for lzma_raw_decoder_memusage().
[205] Fix | Delete
*
[206] Fix | Delete
* \param preset Compression preset (level and possible flags)
[207] Fix | Delete
*
[208] Fix | Delete
* \return Number of bytes of memory required to decompress a file
[209] Fix | Delete
* that was compressed using the given preset. If an error
[210] Fix | Delete
* occurs, for example due to unsupported preset, UINT64_MAX
[211] Fix | Delete
* is returned.
[212] Fix | Delete
*/
[213] Fix | Delete
extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
[214] Fix | Delete
lzma_nothrow lzma_attr_pure;
[215] Fix | Delete
[216] Fix | Delete
[217] Fix | Delete
/**
[218] Fix | Delete
* \brief Initialize .xz Stream encoder using a preset number
[219] Fix | Delete
*
[220] Fix | Delete
* This function is intended for those who just want to use the basic features
[221] Fix | Delete
* if liblzma (that is, most developers out there).
[222] Fix | Delete
*
[223] Fix | Delete
* \param strm Pointer to lzma_stream that is at least initialized
[224] Fix | Delete
* with LZMA_STREAM_INIT.
[225] Fix | Delete
* \param preset Compression preset to use. A preset consist of level
[226] Fix | Delete
* number and zero or more flags. Usually flags aren't
[227] Fix | Delete
* used, so preset is simply a number [0, 9] which match
[228] Fix | Delete
* the options -0 ... -9 of the xz command line tool.
[229] Fix | Delete
* Additional flags can be be set using bitwise-or with
[230] Fix | Delete
* the preset level number, e.g. 6 | LZMA_PRESET_EXTREME.
[231] Fix | Delete
* \param check Integrity check type to use. See check.h for available
[232] Fix | Delete
* checks. The xz command line tool defaults to
[233] Fix | Delete
* LZMA_CHECK_CRC64, which is a good choice if you are
[234] Fix | Delete
* unsure. LZMA_CHECK_CRC32 is good too as long as the
[235] Fix | Delete
* uncompressed file is not many gigabytes.
[236] Fix | Delete
*
[237] Fix | Delete
* \return - LZMA_OK: Initialization succeeded. Use lzma_code() to
[238] Fix | Delete
* encode your data.
[239] Fix | Delete
* - LZMA_MEM_ERROR: Memory allocation failed.
[240] Fix | Delete
* - LZMA_OPTIONS_ERROR: The given compression preset is not
[241] Fix | Delete
* supported by this build of liblzma.
[242] Fix | Delete
* - LZMA_UNSUPPORTED_CHECK: The given check type is not
[243] Fix | Delete
* supported by this liblzma build.
[244] Fix | Delete
* - LZMA_PROG_ERROR: One or more of the parameters have values
[245] Fix | Delete
* that will never be valid. For example, strm == NULL.
[246] Fix | Delete
*
[247] Fix | Delete
* If initialization fails (return value is not LZMA_OK), all the memory
[248] Fix | Delete
* allocated for *strm by liblzma is always freed. Thus, there is no need
[249] Fix | Delete
* to call lzma_end() after failed initialization.
[250] Fix | Delete
*
[251] Fix | Delete
* If initialization succeeds, use lzma_code() to do the actual encoding.
[252] Fix | Delete
* Valid values for `action' (the second argument of lzma_code()) are
[253] Fix | Delete
* LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future,
[254] Fix | Delete
* there may be compression levels or flags that don't support LZMA_SYNC_FLUSH.
[255] Fix | Delete
*/
[256] Fix | Delete
extern LZMA_API(lzma_ret) lzma_easy_encoder(
[257] Fix | Delete
lzma_stream *strm, uint32_t preset, lzma_check check)
[258] Fix | Delete
lzma_nothrow lzma_attr_warn_unused_result;
[259] Fix | Delete
[260] Fix | Delete
[261] Fix | Delete
/**
[262] Fix | Delete
* \brief Single-call .xz Stream encoding using a preset number
[263] Fix | Delete
*
[264] Fix | Delete
* The maximum required output buffer size can be calculated with
[265] Fix | Delete
* lzma_stream_buffer_bound().
[266] Fix | Delete
*
[267] Fix | Delete
* \param preset Compression preset to use. See the description
[268] Fix | Delete
* in lzma_easy_encoder().
[269] Fix | Delete
* \param check Type of the integrity check to calculate from
[270] Fix | Delete
* uncompressed data.
[271] Fix | Delete
* \param allocator lzma_allocator for custom allocator functions.
[272] Fix | Delete
* Set to NULL to use malloc() and free().
[273] Fix | Delete
* \param in Beginning of the input buffer
[274] Fix | Delete
* \param in_size Size of the input buffer
[275] Fix | Delete
* \param out Beginning of the output buffer
[276] Fix | Delete
* \param out_pos The next byte will be written to out[*out_pos].
[277] Fix | Delete
* *out_pos is updated only if encoding succeeds.
[278] Fix | Delete
* \param out_size Size of the out buffer; the first byte into
[279] Fix | Delete
* which no data is written to is out[out_size].
[280] Fix | Delete
*
[281] Fix | Delete
* \return - LZMA_OK: Encoding was successful.
[282] Fix | Delete
* - LZMA_BUF_ERROR: Not enough output buffer space.
[283] Fix | Delete
* - LZMA_UNSUPPORTED_CHECK
[284] Fix | Delete
* - LZMA_OPTIONS_ERROR
[285] Fix | Delete
* - LZMA_MEM_ERROR
[286] Fix | Delete
* - LZMA_DATA_ERROR
[287] Fix | Delete
* - LZMA_PROG_ERROR
[288] Fix | Delete
*/
[289] Fix | Delete
extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
[290] Fix | Delete
uint32_t preset, lzma_check check,
[291] Fix | Delete
const lzma_allocator *allocator,
[292] Fix | Delete
const uint8_t *in, size_t in_size,
[293] Fix | Delete
uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
[294] Fix | Delete
[295] Fix | Delete
[296] Fix | Delete
/**
[297] Fix | Delete
* \brief Initialize .xz Stream encoder using a custom filter chain
[298] Fix | Delete
*
[299] Fix | Delete
* \param strm Pointer to properly prepared lzma_stream
[300] Fix | Delete
* \param filters Array of filters. This must be terminated with
[301] Fix | Delete
* filters[n].id = LZMA_VLI_UNKNOWN. See filter.h for
[302] Fix | Delete
* more information.
[303] Fix | Delete
* \param check Type of the integrity check to calculate from
[304] Fix | Delete
* uncompressed data.
[305] Fix | Delete
*
[306] Fix | Delete
* \return - LZMA_OK: Initialization was successful.
[307] Fix | Delete
* - LZMA_MEM_ERROR
[308] Fix | Delete
* - LZMA_UNSUPPORTED_CHECK
[309] Fix | Delete
* - LZMA_OPTIONS_ERROR
[310] Fix | Delete
* - LZMA_PROG_ERROR
[311] Fix | Delete
*/
[312] Fix | Delete
extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm,
[313] Fix | Delete
const lzma_filter *filters, lzma_check check)
[314] Fix | Delete
lzma_nothrow lzma_attr_warn_unused_result;
[315] Fix | Delete
[316] Fix | Delete
[317] Fix | Delete
/**
[318] Fix | Delete
* \brief Calculate approximate memory usage of multithreaded .xz encoder
[319] Fix | Delete
*
[320] Fix | Delete
* Since doing the encoding in threaded mode doesn't affect the memory
[321] Fix | Delete
* requirements of single-threaded decompressor, you can use
[322] Fix | Delete
* lzma_easy_decoder_memusage(options->preset) or
[323] Fix | Delete
* lzma_raw_decoder_memusage(options->filters) to calculate
[324] Fix | Delete
* the decompressor memory requirements.
[325] Fix | Delete
*
[326] Fix | Delete
* \param options Compression options
[327] Fix | Delete
*
[328] Fix | Delete
* \return Number of bytes of memory required for encoding with the
[329] Fix | Delete
* given options. If an error occurs, for example due to
[330] Fix | Delete
* unsupported preset or filter chain, UINT64_MAX is returned.
[331] Fix | Delete
*/
[332] Fix | Delete
extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage(
[333] Fix | Delete
const lzma_mt *options) lzma_nothrow lzma_attr_pure;
[334] Fix | Delete
[335] Fix | Delete
[336] Fix | Delete
/**
[337] Fix | Delete
* \brief Initialize multithreaded .xz Stream encoder
[338] Fix | Delete
*
[339] Fix | Delete
* This provides the functionality of lzma_easy_encoder() and
[340] Fix | Delete
* lzma_stream_encoder() as a single function for multithreaded use.
[341] Fix | Delete
*
[342] Fix | Delete
* The supported actions for lzma_code() are LZMA_RUN, LZMA_FULL_FLUSH,
[343] Fix | Delete
* LZMA_FULL_BARRIER, and LZMA_FINISH. Support for LZMA_SYNC_FLUSH might be
[344] Fix | Delete
* added in the future.
[345] Fix | Delete
*
[346] Fix | Delete
* \param strm Pointer to properly prepared lzma_stream
[347] Fix | Delete
* \param options Pointer to multithreaded compression options
[348] Fix | Delete
*
[349] Fix | Delete
* \return - LZMA_OK
[350] Fix | Delete
* - LZMA_MEM_ERROR
[351] Fix | Delete
* - LZMA_UNSUPPORTED_CHECK
[352] Fix | Delete
* - LZMA_OPTIONS_ERROR
[353] Fix | Delete
* - LZMA_PROG_ERROR
[354] Fix | Delete
*/
[355] Fix | Delete
extern LZMA_API(lzma_ret) lzma_stream_encoder_mt(
[356] Fix | Delete
lzma_stream *strm, const lzma_mt *options)
[357] Fix | Delete
lzma_nothrow lzma_attr_warn_unused_result;
[358] Fix | Delete
[359] Fix | Delete
[360] Fix | Delete
/**
[361] Fix | Delete
* \brief Initialize .lzma encoder (legacy file format)
[362] Fix | Delete
*
[363] Fix | Delete
* The .lzma format is sometimes called the LZMA_Alone format, which is the
[364] Fix | Delete
* reason for the name of this function. The .lzma format supports only the
[365] Fix | Delete
* LZMA1 filter. There is no support for integrity checks like CRC32.
[366] Fix | Delete
*
[367] Fix | Delete
* Use this function if and only if you need to create files readable by
[368] Fix | Delete
* legacy LZMA tools such as LZMA Utils 4.32.x. Moving to the .xz format
[369] Fix | Delete
* is strongly recommended.
[370] Fix | Delete
*
[371] Fix | Delete
* The valid action values for lzma_code() are LZMA_RUN and LZMA_FINISH.
[372] Fix | Delete
* No kind of flushing is supported, because the file format doesn't make
[373] Fix | Delete
* it possible.
[374] Fix | Delete
*
[375] Fix | Delete
* \return - LZMA_OK
[376] Fix | Delete
* - LZMA_MEM_ERROR
[377] Fix | Delete
* - LZMA_OPTIONS_ERROR
[378] Fix | Delete
* - LZMA_PROG_ERROR
[379] Fix | Delete
*/
[380] Fix | Delete
extern LZMA_API(lzma_ret) lzma_alone_encoder(
[381] Fix | Delete
lzma_stream *strm, const lzma_options_lzma *options)
[382] Fix | Delete
lzma_nothrow lzma_attr_warn_unused_result;
[383] Fix | Delete
[384] Fix | Delete
[385] Fix | Delete
/**
[386] Fix | Delete
* \brief Calculate output buffer size for single-call Stream encoder
[387] Fix | Delete
*
[388] Fix | Delete
* When trying to compress uncompressible data, the encoded size will be
[389] Fix | Delete
* slightly bigger than the input data. This function calculates how much
[390] Fix | Delete
* output buffer space is required to be sure that lzma_stream_buffer_encode()
[391] Fix | Delete
* doesn't return LZMA_BUF_ERROR.
[392] Fix | Delete
*
[393] Fix | Delete
* The calculated value is not exact, but it is guaranteed to be big enough.
[394] Fix | Delete
* The actual maximum output space required may be slightly smaller (up to
[395] Fix | Delete
* about 100 bytes). This should not be a problem in practice.
[396] Fix | Delete
*
[397] Fix | Delete
* If the calculated maximum size doesn't fit into size_t or would make the
[398] Fix | Delete
* Stream grow past LZMA_VLI_MAX (which should never happen in practice),
[399] Fix | Delete
* zero is returned to indicate the error.
[400] Fix | Delete
*
[401] Fix | Delete
* \note The limit calculated by this function applies only to
[402] Fix | Delete
* single-call encoding. Multi-call encoding may (and probably
[403] Fix | Delete
* will) have larger maximum expansion when encoding
[404] Fix | Delete
* uncompressible data. Currently there is no function to
[405] Fix | Delete
* calculate the maximum expansion of multi-call encoding.
[406] Fix | Delete
*/
[407] Fix | Delete
extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
[408] Fix | Delete
lzma_nothrow;
[409] Fix | Delete
[410] Fix | Delete
[411] Fix | Delete
/**
[412] Fix | Delete
* \brief Single-call .xz Stream encoder
[413] Fix | Delete
*
[414] Fix | Delete
* \param filters Array of filters. This must be terminated with
[415] Fix | Delete
* filters[n].id = LZMA_VLI_UNKNOWN. See filter.h
[416] Fix | Delete
* for more information.
[417] Fix | Delete
* \param check Type of the integrity check to calculate from
[418] Fix | Delete
* uncompressed data.
[419] Fix | Delete
* \param allocator lzma_allocator for custom allocator functions.
[420] Fix | Delete
* Set to NULL to use malloc() and free().
[421] Fix | Delete
* \param in Beginning of the input buffer
[422] Fix | Delete
* \param in_size Size of the input buffer
[423] Fix | Delete
* \param out Beginning of the output buffer
[424] Fix | Delete
* \param out_pos The next byte will be written to out[*out_pos].
[425] Fix | Delete
* *out_pos is updated only if encoding succeeds.
[426] Fix | Delete
* \param out_size Size of the out buffer; the first byte into
[427] Fix | Delete
* which no data is written to is out[out_size].
[428] Fix | Delete
*
[429] Fix | Delete
* \return - LZMA_OK: Encoding was successful.
[430] Fix | Delete
* - LZMA_BUF_ERROR: Not enough output buffer space.
[431] Fix | Delete
* - LZMA_UNSUPPORTED_CHECK
[432] Fix | Delete
* - LZMA_OPTIONS_ERROR
[433] Fix | Delete
* - LZMA_MEM_ERROR
[434] Fix | Delete
* - LZMA_DATA_ERROR
[435] Fix | Delete
* - LZMA_PROG_ERROR
[436] Fix | Delete
*/
[437] Fix | Delete
extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
[438] Fix | Delete
lzma_filter *filters, lzma_check check,
[439] Fix | Delete
const lzma_allocator *allocator,
[440] Fix | Delete
const uint8_t *in, size_t in_size,
[441] Fix | Delete
uint8_t *out, size_t *out_pos, size_t out_size)
[442] Fix | Delete
lzma_nothrow lzma_attr_warn_unused_result;
[443] Fix | Delete
[444] Fix | Delete
[445] Fix | Delete
/************
[446] Fix | Delete
* Decoding *
[447] Fix | Delete
************/
[448] Fix | Delete
[449] Fix | Delete
/**
[450] Fix | Delete
* This flag makes lzma_code() return LZMA_NO_CHECK if the input stream
[451] Fix | Delete
* being decoded has no integrity check. Note that when used with
[452] Fix | Delete
* lzma_auto_decoder(), all .lzma files will trigger LZMA_NO_CHECK
[453] Fix | Delete
* if LZMA_TELL_NO_CHECK is used.
[454] Fix | Delete
*/
[455] Fix | Delete
#define LZMA_TELL_NO_CHECK UINT32_C(0x01)
[456] Fix | Delete
[457] Fix | Delete
[458] Fix | Delete
/**
[459] Fix | Delete
* This flag makes lzma_code() return LZMA_UNSUPPORTED_CHECK if the input
[460] Fix | Delete
* stream has an integrity check, but the type of the integrity check is not
[461] Fix | Delete
* supported by this liblzma version or build. Such files can still be
[462] Fix | Delete
* decoded, but the integrity check cannot be verified.
[463] Fix | Delete
*/
[464] Fix | Delete
#define LZMA_TELL_UNSUPPORTED_CHECK UINT32_C(0x02)
[465] Fix | Delete
[466] Fix | Delete
[467] Fix | Delete
/**
[468] Fix | Delete
* This flag makes lzma_code() return LZMA_GET_CHECK as soon as the type
[469] Fix | Delete
* of the integrity check is known. The type can then be got with
[470] Fix | Delete
* lzma_get_check().
[471] Fix | Delete
*/
[472] Fix | Delete
#define LZMA_TELL_ANY_CHECK UINT32_C(0x04)
[473] Fix | Delete
[474] Fix | Delete
[475] Fix | Delete
/**
[476] Fix | Delete
* This flag makes lzma_code() not calculate and verify the integrity check
[477] Fix | Delete
* of the compressed data in .xz files. This means that invalid integrity
[478] Fix | Delete
* check values won't be detected and LZMA_DATA_ERROR won't be returned in
[479] Fix | Delete
* such cases.
[480] Fix | Delete
*
[481] Fix | Delete
* This flag only affects the checks of the compressed data itself; the CRC32
[482] Fix | Delete
* values in the .xz headers will still be verified normally.
[483] Fix | Delete
*
[484] Fix | Delete
* Don't use this flag unless you know what you are doing. Possible reasons
[485] Fix | Delete
* to use this flag:
[486] Fix | Delete
*
[487] Fix | Delete
* - Trying to recover data from a corrupt .xz file.
[488] Fix | Delete
*
[489] Fix | Delete
* - Speeding up decompression, which matters mostly with SHA-256
[490] Fix | Delete
* or with files that have compressed extremely well. It's recommended
[491] Fix | Delete
* to not use this flag for this purpose unless the file integrity is
[492] Fix | Delete
* verified externally in some other way.
[493] Fix | Delete
*
[494] Fix | Delete
* Support for this flag was added in liblzma 5.1.4beta.
[495] Fix | Delete
*/
[496] Fix | Delete
#define LZMA_IGNORE_CHECK UINT32_C(0x10)
[497] Fix | Delete
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function