ScummVM API documentation
lzss.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef TWINE_RESOURCES_LZSS_H
23#define TWINE_RESOURCES_LZSS_H
24
25#include "common/stream.h"
26
27namespace TwinE {
28
30private:
31 uint8 *_outLzssBufData;
32 uint32 _size;
33 uint32 _pos;
34 bool _err = false;
35
36 void decodeLZSS(Common::ReadStream *indata, uint32 mode, uint32 length);
37
38public:
39 LzssReadStream(Common::ReadStream *indata, uint32 mode, uint32 realsize);
40 virtual ~LzssReadStream();
41
42 void clearErr() override { _err = false; }
43 bool err() const override { return _err; }
44 int64 pos() const override { return _pos; }
45 int64 size() const override { return _size; }
46 bool seek(int64 offset, int whence = SEEK_SET) override;
47
48 bool eos() const override;
49 uint32 read(void *buf, uint32 size) override;
50};
51
52} // namespace TwinE
53
54#endif
Definition: stream.h:385
Definition: stream.h:745
Definition: lzss.h:29
bool seek(int64 offset, int whence=SEEK_SET) override
uint32 read(void *buf, uint32 size) override
void clearErr() override
Definition: lzss.h:42
bool eos() const override
int64 size() const override
Definition: lzss.h:45
int64 pos() const override
Definition: lzss.h:44
bool err() const override
Definition: lzss.h:43