From 3eebd9d5aaeef4adfa62d95cd6f4f60b917a48c2 Mon Sep 17 00:00:00 2001 From: KiritoDv Date: Tue, 2 Apr 2024 08:32:39 -0600 Subject: Removed header, values and indices with just offset --- src/utils/Decompressor.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/utils/Decompressor.h') diff --git a/src/utils/Decompressor.h b/src/utils/Decompressor.h index 0cb5a01..d7671a4 100644 --- a/src/utils/Decompressor.h +++ b/src/utils/Decompressor.h @@ -6,6 +6,7 @@ #include #include #include +#include "BinaryReader.h" enum class CompressionType { None, @@ -23,12 +24,17 @@ struct DataChunk { struct DecompressedData { DataChunk* root; DataChunk segment; + + LUS::BinaryReader GetReader() { + return LUS::BinaryReader(reinterpret_cast(segment.data), segment.size); + } }; class Decompressor { public: static DataChunk* Decode(const std::vector& buffer, uint32_t offset, CompressionType type); static DecompressedData AutoDecode(YAML::Node& node, std::vector& buffer, std::optional size = std::nullopt); + static DecompressedData AutoDecode(uint32_t offset, std::optional size, std::vector& buffer); static uint32_t TranslateAddr(uint32_t addr, bool baseAddress = false); static bool IsSegmented(uint32_t addr); -- cgit v1.2.3