Athena IO Library
Compression.hpp
1 // This file is part of libAthena.
2 //
3 // libAthena is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // libAthena is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with libAthena. If not, see <http://www.gnu.org/licenses/>
15 
16 #ifndef COMPRESSION_HPP
17 #define COMPRESSION_HPP
18 
19 #include "Athena/Global.hpp"
20 
21 namespace Athena
22 {
23 namespace io
24 {
25 namespace Compression
26 {
27 // Zlib compression
28 atInt32 decompressZlib(const atUint8* src, atUint32 srcLen, atUint8* dst, atUint32 dstLen);
29 atInt32 compressZlib(const atUint8* src, atUint32 srcLen, atUint8* dst, atUint32 dstLen);
30 
31 // lzo compression
32 atInt32 decompressLZO(const atUint8* source, atInt32 sourceSize, atUint8* dst, atInt32& dstSize);
33 
34 // Yaz0 encoding
35 atUint32 yaz0Decode(const atUint8* src, atUint8* dst, atUint32 uncompressedSize);
36 atUint32 yaz0Encode(const atUint8* src, atUint32 srcSize, atUint8* data);
37 
38 atUint32 decompressLZ77(const atUint8* src, atUint32 srcLen, atUint8** dst);
39 atUint32 compressLZ77(const atUint8* src, atUint32 srcLen, atUint8** dst, bool extended = false);
40 }
41 }
42 }
43 #endif // COMPRESSION_HPP