libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gimbal_compression.h
Go to the documentation of this file.
1/*! \file
2 * \brief Low-level compression API
3 * \ingroup algorithms
4 *
5 * This file contains the lowest-level core API for
6 * compression and decompression. It operates on raw
7 * byte buffers.
8 *
9 * \note
10 * The underlying compression library and algorithm
11 * used by this API is LZ4.
12 *
13 * \author 2023 Falco Girgis
14 * \copyright MIT License
15 */
16#ifndef GIMBAL_COMPRESSION_H
17#define GIMBAL_COMPRESSION_H
18
19#include "../core/gimbal_decls.h"
20
22
23//! Compresses the source buffer into the sized destination buffer, returning its actual compressed size
24GBL_EXPORT int gblCompress(const void* pSrc,
25 void* pDst,
26 size_t srcSize,
27 size_t dstCapacity,
28 int compressionLevel) GBL_NOEXCEPT;
29
30//! Decompresses the source buffer into the sized destination buffer, returning its actual decompressed size
31GBL_EXPORT int gblDecompress(const void* pSrc,
32 void* pDst,
33 size_t srcSize,
34 size_t dstCapacity) GBL_NOEXCEPT;
35
37
38#endif // GIMBAL_COMPRESSION_H
#define GBL_NOEXCEPT
int gblCompress(const void *pSrc, void *pDst, size_t srcSize, size_t dstCapacity, int compressionLevel)
Compresses the source buffer into the sized destination buffer, returning its actual compressed size.
int gblDecompress(const void *pSrc, void *pDst, size_t srcSize, size_t dstCapacity)
Decompresses the source buffer into the sized destination buffer, returning its actual decompressed s...
#define GBL_DECLS_BEGIN
#define GBL_EXPORT