Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Compression::Compressor Class Reference

Contains routines for data compression. More...

#include <StringCompression.h>

Public Member Functions

template<auto Algorithm>
Compression::Result Compress (const void *const Input, const size_t Size)
 
Result CompressGZip (ContiguousByteBufferView Input)
 
 Compressor (int CompressionFactor=6)
 Creates a new compressor instance with a compression factor [0-12]. More...
 
Result CompressZLib (const void *Input, size_t Size)
 
Result CompressZLib (ContiguousByteBufferView Input)
 
 ~Compressor ()
 

Private Member Functions

template<auto Algorithm>
Result Compress (const void *Input, size_t Size)
 

Private Attributes

libdeflate_compressor * m_Handle
 

Detailed Description

Contains routines for data compression.

Definition at line 43 of file StringCompression.h.

Constructor & Destructor Documentation

◆ Compressor()

Compression::Compressor::Compressor ( int  CompressionFactor = 6)

Creates a new compressor instance with a compression factor [0-12].

Definition at line 51 of file StringCompression.cpp.

◆ ~Compressor()

Compression::Compressor::~Compressor ( )

Definition at line 65 of file StringCompression.cpp.

Member Function Documentation

◆ Compress() [1/2]

template<auto Algorithm>
Compression::Result Compression::Compressor::Compress ( const void *const  Input,
const size_t  Size 
)

Definition at line 75 of file StringCompression.cpp.

◆ Compress() [2/2]

template<auto Algorithm>
Result Compression::Compressor::Compress ( const void *  Input,
size_t  Size 
)
private

◆ CompressGZip()

Compression::Result Compression::Compressor::CompressGZip ( ContiguousByteBufferView  Input)

Definition at line 110 of file StringCompression.cpp.

◆ CompressZLib() [1/2]

Compression::Result Compression::Compressor::CompressZLib ( const void *  Input,
size_t  Size 
)

Definition at line 128 of file StringCompression.cpp.

◆ CompressZLib() [2/2]

Compression::Result Compression::Compressor::CompressZLib ( ContiguousByteBufferView  Input)

Definition at line 119 of file StringCompression.cpp.

Member Data Documentation

◆ m_Handle

libdeflate_compressor* Compression::Compressor::m_Handle
private

Definition at line 60 of file StringCompression.h.


The documentation for this class was generated from the following files: