If you have free memory space, then we unpack the file directly to the memory and file scanning is faster. After scanning we unalloc that memory buffer (or delete a temp file).

Some archives have to be unpacked completely only to disk (ACE, CAB, ARC, ZOO) and then they’re scanned.