mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-12-06 03:07:48 +00:00
chore: dump fastfile data when xenon t6 fastfile is detected
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
|
||||
#include "XChunkException.h"
|
||||
|
||||
#include <format>
|
||||
#include <iostream>
|
||||
#include <zlib.h>
|
||||
#include <zutil.h>
|
||||
|
||||
size_t XChunkProcessorInflate::Process(int streamNumber, const uint8_t* input, const size_t inputLength, uint8_t* output, const size_t outputBufferSize)
|
||||
size_t XChunkProcessorInflate::Process(unsigned streamNumber, const uint8_t* input, const size_t inputLength, uint8_t* output, const size_t outputBufferSize)
|
||||
{
|
||||
z_stream stream{};
|
||||
stream.zalloc = Z_NULL;
|
||||
@@ -23,7 +25,10 @@ size_t XChunkProcessorInflate::Process(int streamNumber, const uint8_t* input, c
|
||||
|
||||
ret = inflate(&stream, Z_FULL_FLUSH);
|
||||
if (ret != Z_STREAM_END)
|
||||
throw XChunkException("Zone has invalid or unsupported compression. Inflate failed");
|
||||
{
|
||||
std::cerr << std::format("inflate of stream failed with error code {}: {}\n", streamNumber, ret, stream.msg);
|
||||
throw XChunkException(std::format("Zone has invalid or unsupported compression: {}", stream.msg));
|
||||
}
|
||||
|
||||
const size_t outputSize = stream.total_out;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user