blob: bee3762ed3e557ec899ca090e14353b76b92d2a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// $Id$
#include "tao/Compression/lzo/LzoCompressor_Factory.h"
#include "tao/Compression/lzo/LzoCompressor.h"
#include <lzo1x.h>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace TAO
{
Lzo_CompressorFactory::Lzo_CompressorFactory (void) :
::TAO::CompressorFactory (::Compression::COMPRESSORID_LZO),
compressor_ (::Compression::Compressor::_nil ())
{
::lzo_init();
}
::Compression::Compressor_ptr
Lzo_CompressorFactory::get_compressor (
::Compression::CompressionLevel compression_level)
{
// @todo, make a array based on compression level
if (CORBA::is_nil (compressor_.in ()))
{
compressor_ = new LzoCompressor (this, compression_level);
}
return ::Compression::Compressor::_duplicate (compressor_.in ());
}
}
TAO_END_VERSIONED_NAMESPACE_DECL
|