1 // BcjCoder.cpp 2 3 #include "StdAfx.h" 4 5 #include "BcjCoder.h" 6 7 namespace NCompress { 8 namespace NBcj { 9 Z7_COM7F_IMF(CCoder2::Init ())10Z7_COM7F_IMF(CCoder2::Init()) 11 { 12 _pc = 0; 13 _state = Z7_BRANCH_CONV_ST_X86_STATE_INIT_VAL; 14 return S_OK; 15 } 16 Z7_COM7F_IMF2(UInt32,CCoder2::Filter (Byte * data,UInt32 size))17Z7_COM7F_IMF2(UInt32, CCoder2::Filter(Byte *data, UInt32 size)) 18 { 19 const UInt32 processed = (UInt32)(size_t)(_convFunc(data, size, _pc, &_state) - data); 20 _pc += processed; 21 return processed; 22 } 23 24 }} 25