1 // BranchMisc.cpp
2 
3 #include "StdAfx.h"
4 
5 #include "BranchMisc.h"
6 
7 namespace NCompress {
8 namespace NBranch {
9 
Init()10 STDMETHODIMP CCoder::Init()
11 {
12   _bufferPos = 0;
13   return S_OK;
14 }
15 
STDMETHODIMP_(UInt32)16 STDMETHODIMP_(UInt32) CCoder::Filter(Byte *data, UInt32 size)
17 {
18   UInt32 processed = (UInt32)BraFunc(data, size, _bufferPos, _encode);
19   _bufferPos += processed;
20   return processed;
21 }
22 
23 }}
24