Files
asteria-qt/src/backend/formats/sources/Fb2ByteSource.h
T
2026-07-31 17:31:02 +02:00

21 lines
606 B
C++

#pragma once
#include "backend/formats/IByteSource.h"
// Byte source over an FB2 document: entries are the ids of its base64
// <binary> 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;
};