1 // BitlDecoder.cpp
2 
3 #include "StdAfx.h"
4 
5 #include "BitlDecoder.h"
6 
7 namespace NBitl {
8 
9 Byte kInvertTable[256];
10 
11 static
12 struct CInverterTableInitializer
13 {
CInverterTableInitializerNBitl::CInverterTableInitializer14   CInverterTableInitializer()
15   {
16     for (unsigned i = 0; i < 256; i++)
17     {
18       unsigned x = ((i & 0x55) << 1) | ((i & 0xAA) >> 1);
19       x = ((x & 0x33) << 2) | ((x & 0xCC) >> 2);
20       kInvertTable[i] = (Byte)(((x & 0x0F) << 4) | ((x & 0xF0) >> 4));
21     }
22   }
23 } g_InverterTableInitializer;
24 
25 }
26