Introduce new package `Catswords.Phantomizer`
**Catswords.Phantomizer** is an HTTP-based dynamic-link library (DLL) loader designed for .NET applications.
It allows your application to fetch and load assemblies directly from your CDN (Azure Blob, S3, Cloudflare R2, etc.) at runtime, with optional GZip compression support.
Added two HttpClient instances to distinguish between legacy (no
Accept-Encoding) and modern compressed HTTP transfer behaviors.
- LegacyHttp:
Sends no Accept-Encoding header.
Used when requesting .dll.gz files, ensuring that the server delivers
the file exactly as-is without applying HTTP-level compression.
- Http:
Enables AutomaticDecompression and advertises Accept-Encoding
(gzip, deflate).
When the server supports HTTP content compression, even a regular .dll
file can be transmitted in compressed form and transparently
decompressed by the client.
This separation prevents ambiguities between:
- File-level compression (.dll.gz)
- Transport-level compression (Content-Encoding: gzip/deflate)
and ensures predictable behavior when downloading assemblies depending on
server capabilities.
To prevent partial or corrupt files on download failure, write the decompressed
stream to a temporary file first, and then atomically move it to the final
destination upon success.
In TryDownloadGzipToFile, modify the catch block to log the exception details
before returning false, instead of silently swallowing the error.
The code properly checks if _telemetryClient is null before tracking the event and uses the assembly version dynamically. However, the Version property of AssemblyName can be null, which would cause a NullReferenceException when calling .ToString().
Replaces manual disposal of InstancesForm with a 'using' statement to ensure proper resource management and exception safety when recording to the metadata database.