DynXX-C
Loading...
Searching...
No Matches
Zip.h
Go to the documentation of this file.
1#pragma once
2
3#include "Types.h"
4
5#include <stdio.h>
6
8
11
18 DynXXZipCompressModePreferSize = 9, // Smallest output size
19};
20
25 DynXXZFormatZLib = 0, // Default zlib header
26 DynXXZFormatGZip = 1, // GZip header
27 DynXXZFormatRaw = 2, // No header
28};
29
38
47size_t dynxx_z_zip_input(DynXXZipHandle zip, const byte *inBytes, size_t inLen, bool inFinish);
48
55const byte *dynxx_z_zip_process_do(DynXXZipHandle zip, DYNXX_OUT size_t *outLen);
56
63
69
77
86size_t dynxx_z_unzip_input(DynXXUnZipHandle unzip, const byte *inBytes, size_t inLen, bool inFinish);
87
94const byte *dynxx_z_unzip_process_do(DynXXUnZipHandle unzip, DYNXX_OUT size_t *outLen);
95
102
108
119bool dynxx_z_cfile_zip(DynXXZipCompressMode mode, size_t bufferSize, DynXXZFormat format, FILE *cFILEIn, FILE *cFILEOut);
120
130bool dynxx_z_cfile_unzip(size_t bufferSize, DynXXZFormat format, FILE *cFILEIn, FILE *cFILEOut);
131
142const byte *dynxx_z_bytes_zip(DynXXZipCompressMode mode, size_t bufferSize, DynXXZFormat format, const byte *inBytes, size_t inLen,
143 DYNXX_OUT size_t *outLen);
144
154const byte *dynxx_z_bytes_unzip(size_t bufferSize, DynXXZFormat format, const byte *inBytes, size_t inLen,
155 DYNXX_OUT size_t *outLen);
156
#define DYNXX_EXTERN_C_BEGIN
Definition Macro.h:13
#define DYNXX_EXTERN_C_END
Definition Macro.h:14
#define DYNXX_OUT
Definition Macro.h:38
uintptr_t address
Definition Types.h:11
bool dynxx_z_zip_process_finished(DynXXZipHandle zip)
check whether all the ZIP data inputed before are processed
void dynxx_z_zip_release(DynXXZipHandle zip)
release a ZIP process
const byte * dynxx_z_bytes_zip(DynXXZipCompressMode mode, size_t bufferSize, DynXXZFormat format, const byte *inBytes, size_t inLen, DYNXX_OUT size_t *outLen)
ZIP for bytes.
size_t dynxx_z_zip_input(DynXXZipHandle zip, const byte *inBytes, size_t inLen, bool inFinish)
input data to ZIP process
void dynxx_z_unzip_release(DynXXUnZipHandle unzip)
release a unzip process
size_t dynxx_z_unzip_input(DynXXUnZipHandle unzip, const byte *inBytes, size_t inLen, bool inFinish)
input data to UNZIP process
const byte * dynxx_z_zip_process_do(DynXXZipHandle zip, DYNXX_OUT size_t *outLen)
process the ZIP input data
DYNXX_EXTERN_C_BEGIN typedef address DynXXZipHandle
Definition Zip.h:9
bool dynxx_z_cfile_unzip(size_t bufferSize, DynXXZFormat format, FILE *cFILEIn, FILE *cFILEOut)
UNZIP for C FILE.
DynXXZFormat
Definition Zip.h:24
@ DynXXZFormatGZip
Definition Zip.h:26
@ DynXXZFormatRaw
Definition Zip.h:27
@ DynXXZFormatZLib
Definition Zip.h:25
DynXXUnZipHandle dynxx_z_unzip_init(size_t bufferSize, DynXXZFormat format)
initialize a UNZIP process
DynXXZipCompressMode
Definition Zip.h:15
@ DynXXZipCompressModePreferSize
Definition Zip.h:18
@ DynXXZipCompressModeDefault
Definition Zip.h:16
@ DynXXZipCompressModePreferSpeed
Definition Zip.h:17
DynXXZipHandle dynxx_z_zip_init(DynXXZipCompressMode mode, size_t bufferSize, DynXXZFormat format)
initialize a ZIP process
const byte * dynxx_z_bytes_unzip(size_t bufferSize, DynXXZFormat format, const byte *inBytes, size_t inLen, DYNXX_OUT size_t *outLen)
UNZIP for bytes.
address DynXXUnZipHandle
Definition Zip.h:10
const byte * dynxx_z_unzip_process_do(DynXXUnZipHandle unzip, DYNXX_OUT size_t *outLen)
process the UNZIP input data
bool dynxx_z_cfile_zip(DynXXZipCompressMode mode, size_t bufferSize, DynXXZFormat format, FILE *cFILEIn, FILE *cFILEOut)
ZIP for C FILE.
bool dynxx_z_unzip_process_finished(DynXXUnZipHandle unzip)
check whether all the ZIP data inputed before are processed