10#include <osc/StateHandler.h>
12#include <osc/DeflateCompressor.h>
15#define RESIPROCATE_SUBSYSTEM Subsystem::SIP
24 : mAlgorithm(
algorithm), mStateHandler(0), mSigcompId(sigcompId)
27 if (algorithm !=
NONE)
29 mStateHandler =
new osc::StateHandler(stateMemorySize,
31 decompressionMemorySize);
32 mStateHandler->useSipDictionary();
41 DebugLog (<<
"Set SigcompId to " << mSigcompId);
44 DebugLog (<<
"COMPRESSION SUPPORT NOT COMPILED IN");
46 DebugLog (<<
"Compression configuration object created; algorithm = "
47 <<
static_cast<int>(mAlgorithm) );
61 switch(getAlgorithm())
64 DebugLog (<<
"Adding Deflate Compressor");
65 stack->addCompressor(
new osc::DeflateCompressor(getStateHandler()));
69 WarningLog (<<
"Invalid compressor specified! Using deflate Compressor");
70 stack->addCompressor(
new osc::DeflateCompressor(getStateHandler()));
73 DebugLog (<<
"Compression disabled: not adding any compressors");
78 DebugLog (<<
"Compression not compiled in: not adding any compressors");
#define WarningLog(args_)
static Compression Disabled
Represents a compression configuration object with compression disabled.
void addCompressorsToStack(osc::Stack *)
Compression(Algorithm algorithm=DEFLATE, int stateMemorySize=8192, int cyclesPerBit=64, int decompressionMemorySize=8192, Data sigcompId=Data::Empty)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
static const Data Empty
Constant that represents a zero-length data.
static Data getVersion4UuidUrn()
Returns a version 4 (random) UUID as defined in RFC 4122.