2015-07-26 21:39:49 +00:00
|
|
|
#ifndef COMPRESSIONUTIL_H
|
|
|
|
#define COMPRESSIONUTIL_H
|
|
|
|
|
2016-02-15 13:20:34 +00:00
|
|
|
#include "TString.h"
|
2015-07-26 21:39:49 +00:00
|
|
|
#include "types.h"
|
2016-02-15 13:20:34 +00:00
|
|
|
#include <FileIO/FileIO.h>
|
2015-07-26 21:39:49 +00:00
|
|
|
|
|
|
|
namespace CompressionUtil
|
|
|
|
{
|
2016-02-15 13:20:34 +00:00
|
|
|
TString ErrorText_zlib(s32 Error);
|
|
|
|
TString ErrorText_LZO(s32 Error);
|
|
|
|
|
|
|
|
// Decompression
|
|
|
|
bool DecompressZlib(u8 *pSrc, u32 SrcLen, u8 *pDst, u32 DstLen, u32& rTotalOut);
|
|
|
|
bool DecompressLZO(u8 *pSrc, u32 SrcLen, u8 *pDst, u32& rTotalOut);
|
|
|
|
bool DecompressSegmentedData(u8 *pSrc, u32 SrcLen, u8 *pDst, u32 DstLen);
|
|
|
|
|
|
|
|
// Compression
|
|
|
|
bool CompressZlib(u8 *pSrc, u32 SrcLen, u8 *pDst, u32 DstLen, u32& rTotalOut);
|
|
|
|
bool CompressLZO(u8 *pSrc, u32 SrcLen, u8 *pDst, u32& rTotalOut);
|
2016-11-07 10:07:00 +00:00
|
|
|
bool CompressSegmentedData(u8 *pSrc, u32 SrcLen, u8 *pDst, u32& rTotalOut, bool IsZlib, bool AllowUncompressedSegments);
|
|
|
|
bool CompressZlibSegmented(u8 *pSrc, u32 SrcLen, u8 *pDst, u32& rTotalOut, bool AllowUncompressedSegments);
|
|
|
|
bool CompressLZOSegmented(u8 *pSrc, u32 SrcLen, u8 *pDst, u32& rTotalOut, bool AllowUncompressedSegments);
|
2015-07-26 21:39:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // COMPRESSIONUTIL_H
|