2020-11-12 08:38:52 +00:00
|
|
|
#pragma once
|
|
|
|
|
2021-01-13 16:28:27 +00:00
|
|
|
#include <hex/views/view.hpp>
|
2020-11-12 08:38:52 +00:00
|
|
|
|
|
|
|
#include <array>
|
|
|
|
#include <cstdio>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace hex {
|
|
|
|
|
|
|
|
namespace prv { class Provider; }
|
|
|
|
|
|
|
|
class ViewInformation : public View {
|
|
|
|
public:
|
2020-12-27 14:39:06 +00:00
|
|
|
explicit ViewInformation();
|
2020-11-12 08:38:52 +00:00
|
|
|
~ViewInformation() override;
|
|
|
|
|
2020-12-22 17:10:01 +00:00
|
|
|
void drawContent() override;
|
|
|
|
void drawMenu() override;
|
2020-11-12 08:38:52 +00:00
|
|
|
|
|
|
|
private:
|
2020-11-22 18:43:35 +00:00
|
|
|
bool m_dataValid = false;
|
2020-11-14 13:41:15 +00:00
|
|
|
u32 m_blockSize = 0;
|
2020-11-12 08:38:52 +00:00
|
|
|
float m_averageEntropy = 0;
|
|
|
|
float m_highestBlockEntropy = 0;
|
|
|
|
std::vector<float> m_blockEntropy;
|
|
|
|
|
2021-04-12 20:20:05 +00:00
|
|
|
double m_entropyHandlePosition;
|
|
|
|
|
2021-03-02 13:32:18 +00:00
|
|
|
std::array<ImU64, 256> m_valueCounts = { 0 };
|
2021-02-22 12:08:06 +00:00
|
|
|
bool m_analyzing = false;
|
2020-11-22 18:43:35 +00:00
|
|
|
|
|
|
|
std::pair<u64, u64> m_analyzedRegion = { 0, 0 };
|
2020-11-12 08:38:52 +00:00
|
|
|
|
|
|
|
std::string m_fileDescription;
|
|
|
|
std::string m_mimeType;
|
2021-02-22 12:08:06 +00:00
|
|
|
|
|
|
|
void analyze();
|
2020-11-12 08:38:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|