DynXX-Cxx
Loading...
Searching...
No Matches
Zip.hxx
Go to the documentation of this file.
1#pragma once
2
3#include "Types.hxx"
4#include "../C/Zip.h"
5#include <cstdio>
6
7constexpr auto DynXXZDefaultBufferSize = 16 * 1024UZ;
8
10 Default = -1,
11 PreferSpeed = 1,
12 PreferSize = 9,
13};
14
15enum class DynXXZFormatX : uint8_t {
16 ZLib = 0,
17 GZip = 1,
18 Raw = 2,
19};
20
24
26
28
30
32
35
37
39
41
43
44[[nodiscard]] bool dynxxZCFileZip(std::FILE *cFILEIn, std::FILE *cFILEOut,
48
49[[nodiscard]] bool dynxxZCFileUnzip(std::FILE *cFILEIn, std::FILE *cFILEOut,
52
53[[nodiscard]] bool dynxxZCxxStreamZip(std::istream *cxxStreamIn, std::ostream *cxxStreamOut,
57
58[[nodiscard]] bool dynxxZCxxStreamUnzip(std::istream *cxxStreamIn, std::ostream *cxxStreamOut,
61
66
std::span< const byte > BytesView
Definition Types.hxx:289
std::vector< byte > Bytes
Definition Types.hxx:290
constexpr T MinV()
Definition Types.hxx:151
bool dynxxZCFileUnzip(std::FILE *cFILEIn, std::FILE *cFILEOut, size_t bufferSize=DynXXZDefaultBufferSize, DynXXZFormatX format=DynXXZFormatX::ZLib)
Bytes dynxxZUnzipProcessDo(DynXXUnZipHandle unzip)
DynXXZFormatX
Definition Zip.hxx:15
void dynxxZUnzipRelease(DynXXUnZipHandle unzip)
bool dynxxZZipProcessFinished(DynXXZipHandle zip)
Bytes dynxxZBytesUnzip(BytesView inBytes, size_t bufferSize=DynXXZDefaultBufferSize, DynXXZFormatX format=DynXXZFormatX::ZLib)
DynXXZipCompressModeX
Definition Zip.hxx:9
Bytes dynxxZBytesZip(BytesView inBytes, DynXXZipCompressModeX mode=DynXXZipCompressModeX::Default, size_t bufferSize=DynXXZDefaultBufferSize, DynXXZFormatX format=DynXXZFormatX::ZLib)
DynXXZipHandle dynxxZZipInit(DynXXZipCompressModeX mode=DynXXZipCompressModeX::Default, size_t bufferSize=DynXXZDefaultBufferSize, DynXXZFormatX format=DynXXZFormatX::ZLib)
bool dynxxZUnzipProcessFinished(DynXXUnZipHandle unzip)
size_t dynxxZUnzipInput(DynXXUnZipHandle unzip, BytesView inBytes, bool inFinish)
constexpr auto DynXXZDefaultBufferSize
Definition Zip.hxx:7
size_t dynxxZZipInput(DynXXZipHandle zip, BytesView inBytes, bool inFinish)
bool dynxxZCxxStreamZip(std::istream *cxxStreamIn, std::ostream *cxxStreamOut, DynXXZipCompressModeX mode=DynXXZipCompressModeX::Default, size_t bufferSize=DynXXZDefaultBufferSize, DynXXZFormatX format=DynXXZFormatX::ZLib)
bool dynxxZCFileZip(std::FILE *cFILEIn, std::FILE *cFILEOut, DynXXZipCompressModeX mode=DynXXZipCompressModeX::Default, size_t bufferSize=DynXXZDefaultBufferSize, DynXXZFormatX format=DynXXZFormatX::ZLib)
Bytes dynxxZZipProcessDo(DynXXZipHandle zip)
DynXXUnZipHandle dynxxZUnzipInit(size_t bufferSize=DynXXZDefaultBufferSize, DynXXZFormatX format=DynXXZFormatX::ZLib)
void dynxxZZipRelease(DynXXZipHandle zip)
bool dynxxZCxxStreamUnzip(std::istream *cxxStreamIn, std::ostream *cxxStreamOut, size_t bufferSize=DynXXZDefaultBufferSize, DynXXZFormatX format=DynXXZFormatX::ZLib)