mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 12:07:03 -06:00
9.34
This commit is contained in:
committed by
Kornel Lesiński
parent
83f8ddcc5b
commit
f08f4dcc3c
30
CPP/7zip/Common/UniqBlocks.h
Normal file
30
CPP/7zip/Common/UniqBlocks.h
Normal file
@@ -0,0 +1,30 @@
|
||||
// UniqBlocks.h
|
||||
|
||||
#ifndef __UNIQ_BLOCKS_H
|
||||
#define __UNIQ_BLOCKS_H
|
||||
|
||||
#include "../../Common/MyTypes.h"
|
||||
#include "../../Common/MyBuffer.h"
|
||||
#include "../../Common/MyVector.h"
|
||||
|
||||
struct CUniqBlocks
|
||||
{
|
||||
CObjectVector<CByteBuffer> Bufs;
|
||||
CIntVector Sorted;
|
||||
CIntVector BufIndexToSortedIndex;
|
||||
|
||||
int AddUniq(const Byte *data, size_t size);
|
||||
UInt64 GetTotalSizeInBytes() const;
|
||||
void GetReverseMap();
|
||||
|
||||
bool IsOnlyEmpty() const
|
||||
{
|
||||
if (Bufs.Size() == 0)
|
||||
return true;
|
||||
if (Bufs.Size() > 1)
|
||||
return false;
|
||||
return Bufs[0].Size() == 0;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user