MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / FragmentedWindow

Class FragmentedWindow

Libraries/unrar/unpack.hpp:183–199  ·  view source on GitHub ↗

We can use the fragmented dictionary in case heap does not have the single large enough memory block. It is slower than normal dictionary.

Source from the content-addressed store, hash-verified

181// We can use the fragmented dictionary in case heap does not have the single
182// large enough memory block. It is slower than normal dictionary.
183class FragmentedWindow
184{
185 private:
186 enum {MAX_MEM_BLOCKS=32};
187
188 void Reset();
189 byte *Mem[MAX_MEM_BLOCKS];
190 size_t MemSize[MAX_MEM_BLOCKS];
191 public:
192 FragmentedWindow();
193 ~FragmentedWindow();
194 void Init(size_t WinSize);
195 byte& operator [](size_t Item);
196 void CopyString(uint Length,uint Distance,size_t &UnpPtr,size_t MaxWinMask);
197 void CopyData(byte *Dest,size_t WinPos,size_t Size);
198 size_t GetBlockSize(size_t StartPos,size_t RequiredSize);
199};
200
201
202class Unpack:PackDef

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected