other-licenses/7zstub/src/7zip/Common/LSBFDecoder.cpp

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 // Stream/LSBFDecoder.cpp
     3 #include "StdAfx.h"
     5 #include "LSBFDecoder.h"
     7 namespace NStream {
     8 namespace NLSBF {
    10 Byte kInvertTable[256];
    12 class CInverterTableInitializer
    13 {
    14 public:
    15   CInverterTableInitializer()
    16   {
    17     for(int i = 0; i < 256; i++)
    18     {
    19       Byte b = Byte(i);
    20       Byte bInvert = 0;
    21       for(int j = 0; j < 8; j++)
    22       {
    23         bInvert <<= 1;
    24         if (b & 1)
    25           bInvert |= 1;
    26         b >>= 1;
    27       }
    28       kInvertTable[i] = bInvert;
    29     }
    30   }
    31 } g_InverterTableInitializer;
    34 }}

mercurial