athena/include/Athena/Compression.hpp

44 lines
1.5 KiB
C++
Raw Normal View History

2014-04-20 09:14:15 +00:00
// This file is part of libAthena.
//
2014-04-20 09:14:15 +00:00
// libAthena is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
2014-04-20 09:14:15 +00:00
// libAthena is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
2014-04-20 09:14:15 +00:00
// along with libAthena. If not, see <http://www.gnu.org/licenses/>
2013-07-21 04:14:33 +00:00
#ifndef COMPRESSION_HPP
#define COMPRESSION_HPP
2014-04-20 09:14:15 +00:00
#include "Athena/Global.hpp"
2013-07-21 04:14:33 +00:00
2014-04-20 09:14:15 +00:00
namespace Athena
2013-07-21 04:14:33 +00:00
{
namespace io
{
namespace Compression
{
2014-09-09 16:36:29 +00:00
// Zlib compression
2014-09-09 16:46:05 +00:00
atInt32 decompressZlib(const atUint8* src, atUint32 srcLen, atUint8* dst, atUint32 dstLen);
atInt32 compressZlib(const atUint8* src, atUint32 srcLen, atUint8* dst, atUint32 dstLen);
2014-09-09 16:36:29 +00:00
// lzo compression
2014-09-09 16:46:05 +00:00
atInt32 decompressLZO(const atUint8* source, atInt32 sourceSize, atUint8* dst, atInt32& dstSize);
2014-09-09 16:36:29 +00:00
// Yaz0 encoding
atUint32 yaz0Decode(const atUint8* src, atUint8* dst, atUint32 uncompressedSize);
2014-09-09 16:36:29 +00:00
atUint32 yaz0Encode(const atUint8* src, atUint32 srcSize, atUint8* data);
2014-09-09 16:53:32 +00:00
atUint32 decompressLZ77(const atUint8* src, atUint32 srcLen, atUint8** dst);
atUint32 compressLZ77(const atUint8* src, atUint32 srcLen, atUint8** dst, bool extended = false);
2013-07-21 04:14:33 +00:00
}
}
}
#endif // COMPRESSION_HPP