SoftBookLZSSStream.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/*
3 * This file is part of the libe-book project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * For further information visit http://libebook.sourceforge.net
8 */
9
10#ifndef SOFTBOOKLZSSSTREAM_H_INCLUDED
11#define SOFTBOOKLZSSSTREAM_H_INCLUDED
12
13#include <memory>
14
15#include <librevenge-stream/librevenge-stream.h>
16
17namespace libebook
18{
19
20class SoftBookLZSSStream : public librevenge::RVNGInputStream
21{
22// disable copying
25
26public:
28 {
29 unsigned offsetBits;
30 unsigned lengthBits;
32 unsigned fillPos;
36
38 };
39
40public:
41 explicit SoftBookLZSSStream(librevenge::RVNGInputStream *stream, const Configuration &configuration = Configuration());
42 ~SoftBookLZSSStream() override;
43
44 bool isStructured() override;
45 unsigned subStreamCount() override;
46 const char *subStreamName(unsigned id) override;
47 bool existsSubStream(const char *name) override;
48 librevenge::RVNGInputStream *getSubStreamByName(const char *name) override;
49 RVNGInputStream *getSubStreamById(unsigned id) override;
50
51 const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) override;
52 int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
53 long tell() override;
54 bool isEnd() override;
55
56private:
57 std::unique_ptr<librevenge::RVNGInputStream> m_stream;
58};
59
60}
61
62#endif // SOFTBOOKLZSSSTREAM_H_INCLUDED
63
64/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
RVNGInputStreamPtr_t stream
Definition: HTMLHelpStream.cpp:79
string name
Definition: HTMLHelpStream.cpp:80
unsigned offset
Definition: SoftBookParser.cpp:74
Definition: SoftBookLZSSStream.h:21
RVNGInputStream * getSubStreamById(unsigned id) override
Definition: SoftBookLZSSStream.cpp:223
bool isEnd() override
Definition: SoftBookLZSSStream.cpp:243
bool isStructured() override
Definition: SoftBookLZSSStream.cpp:198
bool existsSubStream(const char *name) override
Definition: SoftBookLZSSStream.cpp:213
~SoftBookLZSSStream() override
Definition: SoftBookLZSSStream.cpp:194
unsigned subStreamCount() override
Definition: SoftBookLZSSStream.cpp:203
SoftBookLZSSStream(const SoftBookLZSSStream &other)
std::unique_ptr< librevenge::RVNGInputStream > m_stream
Definition: SoftBookLZSSStream.h:57
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override
Definition: SoftBookLZSSStream.cpp:233
librevenge::RVNGInputStream * getSubStreamByName(const char *name) override
Definition: SoftBookLZSSStream.cpp:218
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead) override
Definition: SoftBookLZSSStream.cpp:228
const char * subStreamName(unsigned id) override
Definition: SoftBookLZSSStream.cpp:208
SoftBookLZSSStream & operator=(const SoftBookLZSSStream &other)
long tell() override
Definition: SoftBookLZSSStream.cpp:238
Definition: BBeBCollector.cpp:19
Definition: SoftBookLZSSStream.h:28
unsigned offsetBits
Definition: SoftBookLZSSStream.h:29
unsigned uncompressedLength
Definition: SoftBookLZSSStream.h:31
bool allowOverflow
Definition: SoftBookLZSSStream.h:34
bool bigEndian
Definition: SoftBookLZSSStream.h:35
unsigned fillPos
Definition: SoftBookLZSSStream.h:32
Configuration()
Definition: SoftBookLZSSStream.cpp:169
unsigned lengthBits
Definition: SoftBookLZSSStream.h:30
char fillChar
Definition: SoftBookLZSSStream.h:33

Generated for libe-book by doxygen 1.9.5