This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::Compress Class

Header: #include <UnigineCompress.h>

Compress class is used to compress and decompress data by using zlib library.

Compress Class

Members


static int zlibCompress( void * dest, int & dest_size, const void * src, int src_size, int quality )

Compress the data.

Arguments

  • void * dest - The destination buffer pointer.
  • int & dest_size - The destination buffer size.
  • const void * src - The source data pointer.
  • int src_size - The source data size.
  • int quality - Compression quality; 0 is for better performance, 1 is for better size.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

static int zlibDecompress( void * dest, int dest_size, const void * src, int src_size )

Decompress the data.

Arguments

  • void * dest - The destination buffer pointer.
  • int dest_size - The destination buffer size.
  • const void * src - The source data pointer.
  • int src_size - The source data size.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

static int zlibSize( int size )

Returns the maximum compressed buffer size.

Arguments

  • int size - The uncompressed data size.

Return value

The maximum compressed buffer size.
Last update: 2018-12-27
Build: ()