Name Description Size
ArchiveCommandLine.cpp 37286
ArchiveCommandLine.h 2703
ArchiveExtractCallback.cpp 43891
ArchiveExtractCallback.h 8660
ArchiveName.cpp 1964
ArchiveName.h 340
ArchiveOpenCallback.cpp 3828
ArchiveOpenCallback.h virtual HRESULT Open_GetPasswordIfAny(bool &passwordIsDefined, UString &password) x; 2832
Bench.cpp 86837
Bench.h struct IBenchFreqCallback { virtual void AddCpuFreq(UInt64 freq) = 0; }; 1828
DefaultName.cpp 1015
DefaultName.h 239
DirItem.h 4595
EnumDirItems.cpp 28643
EnumDirItems.h 1000
ExitCode.h 769
Extract.cpp #ifdef _WIN32 else if (NName::IsAltPathPrefix(outDir)) {} #endif 12459
Extract.h 2051
ExtractingFilePath.cpp // if (g_PathTrailReplaceMode == 1) { if (!s.IsEmpty()) { wchar_t c = s.Back(); if (c == '.' || c == ' ') { // s += (wchar_t)(0x9c); // STRING TERMINATOR s += (wchar_t)'_'; } } } else 5806
ExtractingFilePath.h Correct_FsPath() corrects path parts to prepare it for File System operations. It also corrects empty path parts like "\\\\": - frontal empty path parts : it removes them or changes them to "_" - another empty path parts : it removes them if (absIsAllowed && path is absolute) : it removes empty path parts after start absolute path prefix marker else { if (!keepAndReplaceEmptyPrefixes) : it removes empty path parts if ( keepAndReplaceEmptyPrefixes) : it changes each empty frontal path part to "_" } 1064
ExtractMode.h 441
HashCalc.cpp 8180
HashCalc.h 2864
IFileExtractCallback.h ---------- IFolderArchiveExtractCallback ---------- is implemented by Console/ExtractCallbackConsole.h CExtractCallbackConsole FileManager/ExtractCallback.h CExtractCallbackImp FAR/ExtractEngine.cpp CExtractCallBackImp: (QueryInterface is not supported) IID_IFolderArchiveExtractCallback is requested by: - Agent/ArchiveFolder.cpp CAgentFolder::CopyTo(..., IFolderOperationsExtractCallback *callback) is sent to IArchiveFolder::Extract() - FileManager/PanelCopy.cpp CPanel::CopyTo(), if (options->testMode) is sent to IArchiveFolder::Extract() IFolderArchiveExtractCallback is used by Common/ArchiveExtractCallback.cpp 3600
LoadCodecs.cpp EXTERNAL_CODECS --------------- CCodecs::Load() tries to detect the directory with plugins. It stops the checking, if it can find any of the following items: - 7z.dll file - "Formats" subdir - "Codecs" subdir The order of check: 1) directory of client executable 2) WIN32: directory for REGISTRY item [HKEY_*\Software\7-Zip\Path**] The order for HKEY_* : Path** : - HKEY_CURRENT_USER : PathXX - HKEY_LOCAL_MACHINE : PathXX - HKEY_CURRENT_USER : Path - HKEY_LOCAL_MACHINE : Path PathXX is Path32 in 32-bit code PathXX is Path64 in 64-bit code EXPORT_CODECS ------------- if (EXTERNAL_CODECS) is defined, then the code exports internal codecs of client from CCodecs object to external plugins. 7-Zip doesn't use that feature. 7-Zip uses the scheme: - client application without internal plugins. - 7z.dll module contains all (or almost all) plugins. 7z.dll can use codecs from another plugins, if required. 27198
LoadCodecs.h Client application uses LoadCodecs.* to load plugins to CCodecs object, that contains 3 lists of plugins: 1) Formats - internal and external archive handlers 2) Codecs - external codecs 3) Hashers - external hashers EXTERNAL_CODECS --------------- if EXTERNAL_CODECS is defined, then the code tries to load external plugins from DLL files (shared libraries). There are two types of executables in 7-Zip: 1) Executable that uses external plugins must be compiled with EXTERNAL_CODECS defined: - 7z.exe, 7zG.exe, 7zFM.exe Note: EXTERNAL_CODECS is used also in CPP/7zip/Common/CreateCoder.h that code is used in plugin module (7z.dll). 2) Standalone modules are compiled without EXTERNAL_CODECS: - SFX modules: 7z.sfx, 7zCon.sfx - standalone versions of console 7-Zip: 7za.exe, 7zr.exe if EXTERNAL_CODECS is defined, CCodecs class implements interfaces: - ICompressCodecsInfo : for Codecs - IHashers : for Hashers The client application can send CCodecs object to each plugin module. And plugin module can use ICompressCodecsInfo or IHashers interface to access another plugins. There are 2 ways to send (ICompressCodecsInfo * compressCodecsInfo) to plugin 1) for old versions: a) request ISetCompressCodecsInfo from created archive handler. b) call ISetCompressCodecsInfo::SetCompressCodecsInfo(compressCodecsInfo) 2) for new versions: a) request "SetCodecs" function from DLL file b) call SetCodecs(compressCodecsInfo) function from DLL file 11166
OpenArchive.cpp Open: - formatIndex >= 0 (exact Format) 1) Open with main type. Archive handler is allowed to use archive start finder. Warning, if there is tail. - formatIndex = -1 (Parser:0) (default) - same as #1 but doesn't return Parser - formatIndex = -2 (#1) - file has supported extension (like a.7z) Open with that main type (only starting from start of file). - open OK: - if there is no tail - return OK - if there is tail: - archive is not "Self Exe" - return OK with Warning, that there is tail - archive is "Self Exe" ignore "Self Exe" stub, and tries to open tail - tail can be open as archive - shows that archive and stub size property. - tail can't be open as archive - shows Parser ??? - open FAIL: Try to open with all other types from offset 0 only. If some open type is OK and physical archive size is uequal or larger than file size, then return that archive with warning that can not be open as [extension type]. If extension was EXE, it will try to open as unknown_extension case - file has unknown extension (like a.hhh) It tries to open via parser code. - if there is full archive or tail archive and unknown block or "Self Exe" at front, it shows tail archive and stub size property. - in another cases, if there is some archive inside file, it returns parser/ - in another cases, it retuens S_FALSE - formatIndex = -3 (#2) - same as #1, but - stub (EXE) + archive is open in Parser - formatIndex = -4 (#3) - returns only Parser. skip full file archive. And show other sub-archives - formatIndex = -5 (#4) - returns only Parser. skip full file archive. And show other sub-archives for each byte pos 93545
OpenArchive.h struct COptionalOpenProperties { UString FormatName; CObjectVector<CProperty> Props; }; 11446
Property.h 180
PropIDUtils.cpp FILE_ATTRIBUTE_ 0 READONLY 1 HIDDEN 2 SYSTEM 3 (Volume label - obsolete) 4 DIRECTORY 5 ARCHIVE 6 DEVICE 7 NORMAL 8 TEMPORARY 9 SPARSE_FILE 10 REPARSE_POINT 11 COMPRESSED 12 OFFLINE 13 NOT_CONTENT_INDEXED (I - Win10 attrib/Explorer) 14 ENCRYPTED 15 INTEGRITY_STREAM (V - ReFS Win8/Win2012) 16 VIRTUAL (reserved) 17 NO_SCRUB_DATA (X - ReFS Win8/Win2012 attrib) 18 RECALL_ON_OPEN or EA 19 PINNED 20 UNPINNED 21 STRICTLY_SEQUENTIAL 22 RECALL_ON_DATA_ACCESS 15012
PropIDUtils.h 687
SetProperties.cpp 2031
SetProperties.h 200
SortUtils.cpp 660
SortUtils.h 190
StdAfx.h 104
TempFiles.cpp 301
TempFiles.h 224
Update.cpp // we don't need clear read-only for folders if (!MySetFileAttributes(path, 0)) return false; 43747
Update.h 5041
UpdateAction.cpp 1221
UpdateAction.h 1423
UpdateCallback.cpp static const CStatProp kProps[] = { { NULL, kpidPath, VT_BSTR}, { NULL, kpidIsDir, VT_BOOL}, { NULL, kpidSize, VT_UI8}, { NULL, kpidCTime, VT_FILETIME}, { NULL, kpidATime, VT_FILETIME}, { NULL, kpidMTime, VT_FILETIME}, { NULL, kpidAttrib, VT_UI4}, { NULL, kpidIsAnti, VT_BOOL} }; STDMETHODIMP CArchiveUpdateCallback::EnumProperties(IEnumSTATPROPSTG **) { return CStatPropEnumerator::CreateEnumerator(kProps, ARRAY_SIZE(kProps), enumerator); } 19665
UpdateCallback.h virtual HRESULT Finalize() x; 4805
UpdatePair.cpp 6508
UpdatePair.h 613
UpdateProduce.cpp ignore alt stream if 1) no such alt stream in Disk 2) there is Host file in disk 1930
UpdateProduce.h 1247
WorkDir.cpp CParsedPath parsedPath; parsedPath.ParsePath(archiveName); UINT driveType = GetDriveType(parsedPath.Prefix); if ((driveType != DRIVE_CDROM) && (driveType != DRIVE_REMOVABLE)) mode = NZipSettings::NWorkDir::NMode::kCurrent; 2440
WorkDir.h 571
ZipRegistry.h 2313