1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-09-28 19:05:55 +08:00
ULib/include/ulib/base/coder/gzio.h
2017-10-04 18:26:27 +02:00

39 lines
855 B
C

/* ============================================================================
//
// = LIBRARY
// ULib - c library
//
// = FILENAME
// gzio.h
//
// = AUTHOR
// Stefano Casazza
//
// ============================================================================ */
#ifndef ULIB_GZIO_H
#define ULIB_GZIO_H 1
#include <ulib/base/base.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Synopsis: Compress and Decompresses the source buffer into the destination buffer
*
* #define GZIP_MAGIC "\037\213" Magic header for gzip files, 1F 8B
*/
extern U_EXPORT bool u_gz_deflate_header; /* deflate, gzip */
U_EXPORT uint32_t u_gz_deflate(const char* restrict input, uint32_t len, char* restrict result, int level);
U_EXPORT uint32_t u_gz_inflate(const char* restrict input, uint32_t len, char* restrict result);
#ifdef __cplusplus
}
#endif
#endif