Merge branch 'upstream-liblzma' into update-liblzma
* upstream-liblzma: liblzma 2014-12-21 (265e5ffb)
This commit is contained in:
commit
60212979ea
|
@ -318,6 +318,9 @@ extern LZMA_API(lzma_ret) lzma_block_header_encode(
|
||||||
* The size of the Block Header must have already been decoded with
|
* The size of the Block Header must have already been decoded with
|
||||||
* lzma_block_header_size_decode() macro and stored to block->header_size.
|
* lzma_block_header_size_decode() macro and stored to block->header_size.
|
||||||
*
|
*
|
||||||
|
* The integrity check type from Stream Header must have been stored
|
||||||
|
* to block->check.
|
||||||
|
*
|
||||||
* block->filters must have been allocated, but they don't need to be
|
* block->filters must have been allocated, but they don't need to be
|
||||||
* initialized (possible existing filter options are not freed).
|
* initialized (possible existing filter options are not freed).
|
||||||
*
|
*
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
*/
|
*/
|
||||||
#define LZMA_VERSION_MAJOR 5
|
#define LZMA_VERSION_MAJOR 5
|
||||||
#define LZMA_VERSION_MINOR 0
|
#define LZMA_VERSION_MINOR 0
|
||||||
#define LZMA_VERSION_PATCH 5
|
#define LZMA_VERSION_PATCH 8
|
||||||
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
|
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
|
||||||
|
|
||||||
#ifndef LZMA_VERSION_COMMIT
|
#ifndef LZMA_VERSION_COMMIT
|
||||||
|
|
|
@ -80,7 +80,7 @@ static const uint32_t SHA256_K[64] = {
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
transform(uint32_t state[], const uint32_t data[])
|
transform(uint32_t state[8], const uint32_t data[16])
|
||||||
{
|
{
|
||||||
uint32_t W[16];
|
uint32_t W[16];
|
||||||
uint32_t T[8];
|
uint32_t T[8];
|
||||||
|
|
|
@ -16,8 +16,9 @@
|
||||||
extern LZMA_API(lzma_bool)
|
extern LZMA_API(lzma_bool)
|
||||||
lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset)
|
lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset)
|
||||||
{
|
{
|
||||||
static const uint8_t dict_size_values[] = { 18, 20, 21, 22, 22, 23, 23, 24, 25, 26 };
|
static const uint8_t dict_pow2[]
|
||||||
static const uint8_t depth_values[] = { 4, 8, 24, 48 };
|
= { 18, 20, 21, 22, 22, 23, 23, 24, 25, 26 };
|
||||||
|
static const uint8_t depths[] = { 4, 8, 24, 48 };
|
||||||
|
|
||||||
const uint32_t level = preset & LZMA_PRESET_LEVEL_MASK;
|
const uint32_t level = preset & LZMA_PRESET_LEVEL_MASK;
|
||||||
const uint32_t flags = preset & ~LZMA_PRESET_LEVEL_MASK;
|
const uint32_t flags = preset & ~LZMA_PRESET_LEVEL_MASK;
|
||||||
|
@ -33,13 +34,13 @@ lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset)
|
||||||
options->lp = LZMA_LP_DEFAULT;
|
options->lp = LZMA_LP_DEFAULT;
|
||||||
options->pb = LZMA_PB_DEFAULT;
|
options->pb = LZMA_PB_DEFAULT;
|
||||||
|
|
||||||
options->dict_size = UINT32_C(1) << dict_size_values[level];
|
options->dict_size = UINT32_C(1) << dict_pow2[level];
|
||||||
|
|
||||||
if (level <= 3) {
|
if (level <= 3) {
|
||||||
options->mode = LZMA_MODE_FAST;
|
options->mode = LZMA_MODE_FAST;
|
||||||
options->mf = level == 0 ? LZMA_MF_HC3 : LZMA_MF_HC4;
|
options->mf = level == 0 ? LZMA_MF_HC3 : LZMA_MF_HC4;
|
||||||
options->nice_len = level <= 1 ? 128 : 273;
|
options->nice_len = level <= 1 ? 128 : 273;
|
||||||
options->depth = depth_values[level];
|
options->depth = depths[level];
|
||||||
} else {
|
} else {
|
||||||
options->mode = LZMA_MODE_NORMAL;
|
options->mode = LZMA_MODE_NORMAL;
|
||||||
options->mf = LZMA_MF_BT4;
|
options->mf = LZMA_MF_BT4;
|
||||||
|
|
Loading…
Reference in New Issue