move self have_chunk to bitset

This commit is contained in:
2024-06-25 12:08:17 +02:00
parent c8619561ec
commit e9e38db1d5
3 changed files with 60 additions and 48 deletions

View File

@@ -8,6 +8,7 @@
#include "./ft1_sha1_info.hpp"
#include "./hash_utils.hpp"
#include "./bitset.hpp"
#include <vector>
@@ -31,7 +32,11 @@ namespace Components {
};
struct FT1ChunkSHA1Cache {
std::vector<bool> have_chunk;
//std::vector<bool> have_chunk;
// have_chunk is the size of info.chunks.size(), or empty if have_all
// keep in mind bitset rounds up to 8s
BitSet have_chunk{0};
bool have_all {false};
size_t have_count {0};
entt::dense_map<SHA1Digest, std::vector<size_t>> chunk_hash_to_index;