• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // UniqBlocks.h
2 
3 #ifndef __UNIQ_BLOCKS_H
4 #define __UNIQ_BLOCKS_H
5 
6 #include "../../Common/MyTypes.h"
7 #include "../../Common/MyBuffer.h"
8 #include "../../Common/MyVector.h"
9 
10 struct CUniqBlocks
11 {
12   CObjectVector<CByteBuffer> Bufs;
13   CUIntVector Sorted;
14   CUIntVector BufIndexToSortedIndex;
15 
16   unsigned AddUniq(const Byte *data, size_t size);
17   UInt64 GetTotalSizeInBytes() const;
18   void GetReverseMap();
19 
IsOnlyEmptyCUniqBlocks20   bool IsOnlyEmpty() const
21   {
22     return (Bufs.Size() == 0 || Bufs.Size() == 1 && Bufs[0].Size() == 0);
23   }
24 };
25 
26 #endif
27