We can use the fragmented dictionary in case heap does not have the single large enough memory block. It is slower than normal dictionary.
| 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. |
| 183 | class 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 | |
| 202 | class Unpack:PackDef |
nothing calls this directly
no outgoing calls
no test coverage detected