#pragma once #include "backend/formats/IByteSource.h" // Byte source over an FB2 document: entries are the ids of its base64 // elements. Parsing is deferred to the calls that need it so that // open() stays cheap for per-request provider use. class Fb2ByteSource : public IByteSource { public: bool open(const QString &path) override; QStringList listEntries() const override; QByteArray readEntry(const QString &binaryId) const override; QByteArray contentHash() const override; private: QByteArray rawBytes() const; QString m_path; mutable QByteArray m_hash; };