![]() |
ImFusion SDK 4.3
|
Compression using the zlib algorithm. More...
Compression using the zlib algorithm.
Enumerations | |
| enum class | CompressionLevel { Default = -1 , None = 0 , BestSpeed = 1 , BestCompression = 9 } |
| Selection of available zlib compression levels. More... | |
Functions | |
| ByteBuffer | compress (const ByteBufferView &inputBuffer, CompressionLevel compressionLevel=CompressionLevel::Default) |
| Compress the given data using zlib. | |
| ByteBuffer | decompress (const ByteBufferView &inputBuffer) |
| Decompress the given data using zlib into a newly created buffer. | |
| bool | decompressTo (const ByteBufferView &inputBuffer, ByteBufferMutableView outputBuffer) |
| Decompress the given data using zlib into an already allocated buffer. | |
|
strong |
Selection of available zlib compression levels.
see https://www.zlib.net/manual.html for more details
| ByteBuffer compress | ( | const ByteBufferView & | inputBuffer, |
| CompressionLevel | compressionLevel = CompressionLevel::Default ) |
Compress the given data using zlib.
Returns an empty buffer on failure.
| ByteBuffer decompress | ( | const ByteBufferView & | inputBuffer | ) |
Decompress the given data using zlib into a newly created buffer.
Use decompressTo() if you know the output size in advance and want to decompress into an already existing buffer. Returns an empty buffer on failure.
| bool decompressTo | ( | const ByteBufferView & | inputBuffer, |
| ByteBufferMutableView | outputBuffer ) |
Decompress the given data using zlib into an already allocated buffer.
The output buffer must be of sufficient size and already allocated.