-
Notifications
You must be signed in to change notification settings - Fork 14
/
LZXDecompressor.hpp
37 lines (26 loc) · 960 Bytes
/
LZXDecompressor.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* Copyright (C) Teemu Suutari */
#ifndef LZXDECOMPRESSOR_HPP
#define LZXDECOMPRESSOR_HPP
#include "XPKDecompressor.hpp"
namespace ancient::internal
{
class LZXDecompressor : public XPKDecompressor
{
public:
LZXDecompressor(uint32_t hdr,uint32_t recursionLevel,const Buffer &packedData,std::shared_ptr<XPKDecompressor::State> &state,bool verify);
~LZXDecompressor() noexcept=default;
const std::string &getSubName() const noexcept final;
void decompressImpl(Buffer &rawData,const Buffer &previousData,bool verify) final;
static bool detectHeaderXPK(uint32_t hdr) noexcept;
static std::shared_ptr<XPKDecompressor> create(uint32_t hdr,uint32_t recursionLevel,const Buffer &packedData,std::shared_ptr<XPKDecompressor::State> &state,bool verify);
private:
const Buffer &_packedData;
bool _isSampled{false};
bool _isCompressed{false};
size_t _packedSize{0};
size_t _packedOffset{0};
size_t _rawSize{0};
uint32_t _rawCRC{0};
};
}
#endif