mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-11 02:07:09 -06:00
3.13
This commit is contained in:
34
7zip/Common/LSBFDecoder.cpp
Executable file
34
7zip/Common/LSBFDecoder.cpp
Executable file
@@ -0,0 +1,34 @@
|
||||
// Stream/LSBFDecoder.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "LSBFDecoder.h"
|
||||
|
||||
namespace NStream {
|
||||
namespace NLSBF {
|
||||
|
||||
BYTE kInvertTable[256];
|
||||
|
||||
class CInverterTableInitializer
|
||||
{
|
||||
public:
|
||||
CInverterTableInitializer()
|
||||
{
|
||||
for(int i = 0; i < 256; i++)
|
||||
{
|
||||
BYTE b = BYTE(i);
|
||||
BYTE bInvert = 0;
|
||||
for(int j = 0; j < 8; j++)
|
||||
{
|
||||
bInvert <<= 1;
|
||||
if (b & 1)
|
||||
bInvert |= 1;
|
||||
b >>= 1;
|
||||
}
|
||||
kInvertTable[i] = bInvert;
|
||||
}
|
||||
}
|
||||
} g_InverterTableInitializer;
|
||||
|
||||
|
||||
}}
|
||||
Reference in New Issue
Block a user