[go: up one dir, main page]

File: LOBDecompressor.hpp

package info (click to toggle)
ancient 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,168 kB
  • sloc: cpp: 15,188; makefile: 217; sh: 31
file content (39 lines) | stat: -rw-r--r-- 855 bytes parent folder | download
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
38
39
/* Copyright (C) Teemu Suutari */

#ifndef LOBDECOMPRESSOR_HPP
#define LOBDECOMPRESSOR_HPP

#include "Decompressor.hpp"

namespace ancient::internal
{

class LOBDecompressor : public Decompressor
{
public:
	LOBDecompressor(const Buffer &packedData,bool verify);
	~LOBDecompressor() noexcept=default;

	const std::string &getName() const noexcept final;
	size_t getPackedSize() const noexcept final;
	size_t getRawSize() const noexcept final;

	void decompressImpl(Buffer &rawData,bool verify) final;

	static bool detectHeader(uint32_t hdr) noexcept;
	static std::shared_ptr<Decompressor> create(const Buffer &packedData,bool exactSizeKnown,bool verify);

private:
	static void decompressRound(Buffer &rawData,const Buffer &packedData);

	const Buffer	&_packedData;

	uint32_t	_rawSize{0};
	uint32_t	_packedSize{0};

	uint32_t	_methodCount;
};

}

#endif