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

Method DoUnpack

Libraries/unrar/unpack.cpp:149–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147
148
149void Unpack::DoUnpack(uint Method,bool Solid)
150{
151 // Methods <50 will crash in Fragmented mode when accessing NULL Window.
152 // They cannot be called in such mode now, but we check it below anyway
153 // just for extra safety.
154 switch(Method)
155 {
156#ifndef SFX_MODULE
157 case 15: // rar 1.5 compression
158 if (!Fragmented)
159 Unpack15(Solid);
160 break;
161 case 20: // rar 2.x compression
162 case 26: // files larger than 2GB
163 if (!Fragmented)
164 Unpack20(Solid);
165 break;
166#endif
167 case 29: // rar 3.x compression
168 if (!Fragmented)
169 Unpack29(Solid);
170 break;
171 case 50: // RAR 5.0 compression algorithm.
172#ifdef RAR_SMP
173 if (MaxUserThreads>1)
174 {
175// We do not use the multithreaded unpack routine to repack RAR archives
176// in 'suspended' mode, because unlike the single threaded code it can
177// write more than one dictionary for same loop pass. So we would need
178// larger buffers of unknown size. Also we do not support multithreading
179// in fragmented window mode.
180 if (!Fragmented)
181 {
182 Unpack5MT(Solid);
183 break;
184 }
185 }
186#endif
187 Unpack5(Solid);
188 break;
189 }
190}
191
192
193void Unpack::UnpInitData(bool Solid)

Callers 5

ExtractACL20Function · 0.80
ReadSubDataMethod · 0.80
DoGetCommentMethod · 0.80
ExtractStreams20Function · 0.80
ExtractCurrentFileMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected