"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CPP/7zip/Compress/BZip2Encoder.cpp" between
p7zip_15.14.1_src_all.tar.gz and p7zip_16.02_src_all.tar.gz

About: p7zip is a command-line file archiver with a high compression ratio (a port of the Windows program 7za.exe).

BZip2Encoder.cpp  (p7zip_15.14.1_src_all):BZip2Encoder.cpp  (p7zip_16.02_src_all)
skipping to change at line 450 skipping to change at line 450
unsigned i = 0; unsigned i = 0;
do do
{ {
UInt32 symbol = mtfs[mtfPos++]; UInt32 symbol = mtfs[mtfPos++];
if (symbol >= 0xFF) if (symbol >= 0xFF)
symbol += mtfs[mtfPos++]; symbol += mtfs[mtfPos++];
symbols[i] = symbol; symbols[i] = symbol;
} }
while (++i < kGroupSize && mtfPos < mtfArraySize); while (++i < kGroupSize && mtfPos < mtfArraySize);
UInt32 bestPrice = 0xFFFFFFFF; UInt32 bestPrice2 = 0xFFFFFFFF;
unsigned t = 0; unsigned t = 0;
do do
{ {
const Byte *lens = Lens[t]; const Byte *lens = Lens[t];
UInt32 price = 0; UInt32 price = 0;
unsigned j = 0; unsigned j = 0;
do do
price += lens[symbols[j]]; price += lens[symbols[j]];
while (++j < i); while (++j < i);
if (price < bestPrice) if (price < bestPrice2)
{ {
m_Selectors[g] = (Byte)t; m_Selectors[g] = (Byte)t;
bestPrice = price; bestPrice2 = price;
} }
} }
while (++t < numTables); while (++t < numTables);
UInt32 *freqs = Freqs[m_Selectors[g++]]; UInt32 *freqs = Freqs[m_Selectors[g++]];
unsigned j = 0; unsigned j = 0;
do do
freqs[symbols[j]]++; freqs[symbols[j]]++;
while (++j < i); while (++j < i);
} }
while (mtfPos < mtfArraySize); while (mtfPos < mtfArraySize);
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS