2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 05:07:43 +00:00

Switch to lzokay library

This commit is contained in:
Jack Andersen
2018-12-19 17:45:48 -10:00
parent b7f35e0528
commit e716d05cec
11 changed files with 16 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
#include <zlib.h>
#include <lzo/lzo1x.h>
#include <lzokay.hpp>
#include "DNAMP1.hpp"
#include "PAK.hpp"
#include "AGSC.hpp"
@@ -122,8 +122,8 @@ std::unique_ptr<atUint8[]> PAK::Entry::getBuffer(const nod::Node& pak, atUint64&
strm->read(&chunkSz, 2);
chunkSz = hecl::SBig(chunkSz);
strm->read(compBuf, chunkSz);
lzo_uint dsz = rem;
lzo1x_decompress(compBuf, chunkSz, bufCur, &dsz, nullptr);
size_t dsz = rem;
lzokay::decompress(compBuf, chunkSz, bufCur, dsz);
bufCur += dsz;
rem -= dsz;
}