How t-1f9c0/storedownloader works
Project Type and Purpose
• This is a .NET solution (StoreDownloader.sln) composed of class-library projects that together implement a low-level “Microsoft Store” / UUP downloader.
Top-Level Components (based on the file tree)
a. Cabinet (src/Cabinet)
– Handles .CAB archive extraction (LZX decoder, stream extensions, structures).
b. CompDB (src/CompDB)
– Parses and models the “Composition Database” (XML metadata for packages).
c. StoreDownloader (src/StoreDownloader)
– Orchestrator API (MSStoreDownloader) for downloading Store app packages.
d. UnifiedUpdatePlatform.Services.WindowsUpdate (src/...WindowsUpdate + ...WindowsUpdate.Downloads)
– Fetches metadata from Windows Update (BuildFetcher, CTAC, ESRP decryptor, correlation IDs).
– Contains HTTP downloader helpers to retrieve individual payloads.
e. internal-sample
– Example usage showing how to wire up the StoreDownloader library.
Key Architectural Patterns
• Layered modules:
• Metadata fetch (WindowsUpdate service) → Package orchestration (StoreDownloader) → Payload download (HTTPDownloader) → Archive extraction (Cabinet) → Metadata parsing (CompDB).
• Separation of concerns: each library project addresses one domain.
• Dependency injection or composition: higher layers depend on abstractions (e.g., HTTPDownloader implements an IDownloader used by StoreDownloader).