PrimeWorldEditor/src/Common/CompressionUtil.h

27 lines
1.0 KiB
C
Raw Normal View History

#ifndef COMPRESSIONUTIL_H
#define COMPRESSIONUTIL_H
2016-02-15 13:20:34 +00:00
#include "TString.h"
#include "types.h"
2016-02-15 13:20:34 +00:00
#include <FileIO/FileIO.h>
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);
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);
}
#endif // COMPRESSIONUTIL_H