"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CPP/7zip/Compress/ByteSwap.cpp" between
p7zip_15.14.1_src_all.tar.gz and p7zip_16.02_src_all.tar.gz

About: p7zip is a command-line file archiver with a high compression ratio (a port of the Windows program 7za.exe).

ByteSwap.cpp  (p7zip_15.14.1_src_all):ByteSwap.cpp  (p7zip_16.02_src_all)
// ByteSwap.cpp // ByteSwap.cpp
#include "StdAfx.h" #include "StdAfx.h"
#include "../../Common/MyCom.h" #include "../../Common/MyCom.h"
#include "../ICoder.h" #include "../ICoder.h"
#include "../Common/RegisterCodec.h" #include "../Common/RegisterCodec.h"
namespace NCompress {
namespace NByteSwap {
class CByteSwap2: class CByteSwap2:
public ICompressFilter, public ICompressFilter,
public CMyUnknownImp public CMyUnknownImp
{ {
public: public:
MY_UNKNOWN_IMP MY_UNKNOWN_IMP1(ICompressFilter);
INTERFACE_ICompressFilter(;) INTERFACE_ICompressFilter(;)
}; };
class CByteSwap4: class CByteSwap4:
public ICompressFilter, public ICompressFilter,
public CMyUnknownImp public CMyUnknownImp
{ {
public: public:
MY_UNKNOWN_IMP MY_UNKNOWN_IMP1(ICompressFilter);
INTERFACE_ICompressFilter(;) INTERFACE_ICompressFilter(;)
}; };
STDMETHODIMP CByteSwap2::Init() { return S_OK; } STDMETHODIMP CByteSwap2::Init() { return S_OK; }
STDMETHODIMP_(UInt32) CByteSwap2::Filter(Byte *data, UInt32 size) STDMETHODIMP_(UInt32) CByteSwap2::Filter(Byte *data, UInt32 size)
{ {
const UInt32 kStep = 2; const UInt32 kStep = 2;
if (size < kStep) if (size < kStep)
return 0; return 0;
skipping to change at line 88 skipping to change at line 91
REGISTER_FILTER_CREATE(CreateFilter2, CByteSwap2()) REGISTER_FILTER_CREATE(CreateFilter2, CByteSwap2())
REGISTER_FILTER_CREATE(CreateFilter4, CByteSwap4()) REGISTER_FILTER_CREATE(CreateFilter4, CByteSwap4())
REGISTER_CODECS_VAR REGISTER_CODECS_VAR
{ {
REGISTER_FILTER_ITEM(CreateFilter2, CreateFilter2, 0x20302, "Swap2"), REGISTER_FILTER_ITEM(CreateFilter2, CreateFilter2, 0x20302, "Swap2"),
REGISTER_FILTER_ITEM(CreateFilter4, CreateFilter4, 0x20304, "Swap4") REGISTER_FILTER_ITEM(CreateFilter4, CreateFilter4, 0x20304, "Swap4")
}; };
REGISTER_CODECS(ByteSwap) REGISTER_CODECS(ByteSwap)
}}
 End of changes. 4 change blocks. 
2 lines changed or deleted 5 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS