mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-15 00:11:40 -06:00
Update Fast LZMA2
This commit is contained in:
@@ -66,7 +66,7 @@ void RC_printPriceTable()
|
||||
for (Probability i = 31; i <= kBitModelTotal - 31; ++i) {
|
||||
RangeEncoder rc;
|
||||
RC_reset(&rc);
|
||||
RC_setOutputBuffer(&rc, buf, sizeof(buf));
|
||||
RC_setOutputBuffer(&rc, buf);
|
||||
for (unsigned j = 0; j < test_size; ++j) {
|
||||
Probability prob = i;
|
||||
RC_encodeBit0(&rc, &prob);
|
||||
@@ -74,7 +74,7 @@ void RC_printPriceTable()
|
||||
RC_flush(&rc);
|
||||
table0[i >> kNumMoveReducingBits] += (unsigned)rc.out_index - 5;
|
||||
RC_reset(&rc);
|
||||
RC_setOutputBuffer(&rc, buf, sizeof(buf));
|
||||
RC_setOutputBuffer(&rc, buf);
|
||||
for (unsigned j = 0; j < test_size; ++j) {
|
||||
Probability prob = i;
|
||||
RC_encodeBit1(&rc, &prob);
|
||||
@@ -104,10 +104,9 @@ void RC_printPriceTable()
|
||||
|
||||
#endif
|
||||
|
||||
void RC_setOutputBuffer(RangeEncoder* const rc, BYTE *const out_buffer, size_t chunk_size)
|
||||
void RC_setOutputBuffer(RangeEncoder* const rc, BYTE *const out_buffer)
|
||||
{
|
||||
rc->out_buffer = out_buffer;
|
||||
rc->chunk_size = chunk_size;
|
||||
rc->out_index = 0;
|
||||
}
|
||||
|
||||
@@ -125,7 +124,8 @@ void FORCE_NOINLINE RC_shiftLow(RangeEncoder* const rc)
|
||||
{
|
||||
U64 low = rc->low;
|
||||
rc->low = (U32)(low << 8);
|
||||
if (low < 0xFF000000 || low > 0xFFFFFFFF) {
|
||||
/* VC15 compiles 'if (low < 0xFF000000 || low > 0xFFFFFFFF)' to this single-branch conditional */
|
||||
if (low + 0xFFFFFFFF01000000 > 0xFFFFFF) {
|
||||
BYTE high = (BYTE)(low >> 32);
|
||||
rc->out_buffer[rc->out_index++] = rc->cache + high;
|
||||
rc->cache = (BYTE)(low >> 24);
|
||||
|
||||
Reference in New Issue
Block a user