12#ifndef OPENVPN_COMPRESS_LZOASYM_H
13#define OPENVPN_COMPRESS_LZOASYM_H
37 const bool support_swap_arg,
42 OVPN_LOG_INFO(
"LZO-ASYM init swap=" << support_swap_arg <<
" asym=" << asym_arg);
49 const char *
name()
const override
void swap(BufferAllocatedType< T_ > &other)
Swaps the contents of this BufferAllocatedType object with another BufferAllocatedType object.
void decompress_work(BufferAllocated &buf)
CompressLZOAsym(const Frame::Ptr &frame, const SessionStats::Ptr &stats, const bool support_swap_arg, const bool asym_arg)
void decompress(BufferAllocated &buf) override
void compress(BufferAllocated &buf, const bool hint) override
OPENVPN_SIMPLE_EXCEPTION(lzo_init_failed)
const char * name() const override
static void init_static()
void do_swap(Buffer &buf, unsigned char op)
void error(BufferAllocated &buf)
void do_unswap(Buffer &buf)
const T * c_data() const
Returns a const pointer to the start of the buffer.
size_t size() const
Returns the size of the buffer in T objects.
T * data()
Get a mutable pointer to the start of the array.
T pop_front()
Removes and returns the first element from the buffer.
void push_front(const T &value)
Append a T object to the array, with possible resize.
void set_size(const size_t size)
After an external method, operating on the array as a mutable unsigned char buffer,...
size_t prepare(const unsigned int context, Buffer &buf) const
#define OVPN_LOG_INFO(args)
#define OVPN_LOG_VERBOSE(args)
int lzo1x_decompress_safe(const unsigned char *input, size_t input_length, unsigned char *output, size_t *output_length)