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
stefanocasazza eb39e7643a sync
2016-07-12 16:11:57 +02:00

37 lines
795 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
*/
U_EXPORT uint32_t u_gz_deflate(const char* restrict input, uint32_t len, char* restrict result, bool bheader);
U_EXPORT uint32_t u_gz_inflate(const char* restrict input, uint32_t len, char* restrict result);
#ifdef __cplusplus
}
#endif
#endif