1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/other-licenses/7zstub/src/7zip/Common/LSBFDecoder.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +// Stream/LSBFDecoder.cpp 1.5 + 1.6 +#include "StdAfx.h" 1.7 + 1.8 +#include "LSBFDecoder.h" 1.9 + 1.10 +namespace NStream { 1.11 +namespace NLSBF { 1.12 + 1.13 +Byte kInvertTable[256]; 1.14 + 1.15 +class CInverterTableInitializer 1.16 +{ 1.17 +public: 1.18 + CInverterTableInitializer() 1.19 + { 1.20 + for(int i = 0; i < 256; i++) 1.21 + { 1.22 + Byte b = Byte(i); 1.23 + Byte bInvert = 0; 1.24 + for(int j = 0; j < 8; j++) 1.25 + { 1.26 + bInvert <<= 1; 1.27 + if (b & 1) 1.28 + bInvert |= 1; 1.29 + b >>= 1; 1.30 + } 1.31 + kInvertTable[i] = bInvert; 1.32 + } 1.33 + } 1.34 +} g_InverterTableInitializer; 1.35 + 1.36 + 1.37 +}}