This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Bounds-Related Classes
Containers
Controls-Related Classes
Core Library
Engine-Related Classes
GUI-Related Classes
Node-Related Classes
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Compress Class

Unigine Compress.

To use this class, include the UnigineCompress.h file.

Unigine::Compress Class

Members


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.

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.
Last update: 2017-07-03
Build: ()