Implement progress output

This commit is contained in:
Leonetienne
2022-06-01 03:28:31 +02:00
parent fb1e6a9e8c
commit e8d81af6f2
9 changed files with 112 additions and 2 deletions

View File

@@ -35,6 +35,9 @@ namespace IO {
//! Returns true, if EOF is reached, and there are no more blocks to fetch (GetNextBlock())
static bool IsFinished();
//! Returns how many blocks have been read, in total
static std::size_t NBlocksRead();
private:
static std::istream* in;
@@ -57,6 +60,9 @@ namespace IO {
// Are we reading ciphertext or regular text?
static bool isReadingCiphertext;
// How many blocks have been read in total
static std::size_t nBlocksRead;
// All read blocks, that haven't been given out yet
static std::queue<Block> blocks;