You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求推荐支持DMG的全托管跨平台.NET Core/.NET Standard压缩库

Working with DMG Files in Fully Managed, Cross-Platform .NET Core/.NET Standard

Great question! Let's dive into what's available for compressing and decompressing DMG (Apple Disk Image) files in a fully managed, platform-agnostic .NET environment:

Key Context First

DMG isn't just a simple archive format—it's a disk container that often includes HFS+ or APFS file systems, encryption, and other Apple-specific features. This makes full-featured, cross-platform support tricky in a fully managed .NET library.

Decompression/Extraction Options

If your goal is to extract files from a DMG (not full disk image manipulation), there are a few community-driven fully managed options to explore:

  • Experimental DMG Readers: Some open-source projects (like DmgReader or similar community repos) offer basic HFS+ DMG parsing in pure C#. These can extract files from unencrypted, non-compressed or zlib-compressed DMGs, but note that they often lack support for encrypted images, APFS, or advanced DMG variants.
  • Limitations to Watch For: Most of these libraries are maintained by small teams or individual developers, so feature completeness and long-term support might be spotty. Always test with your specific DMG files to ensure compatibility.

Compression/Creating DMGs

Unfortunately, there are no mature, fully managed, cross-platform .NET libraries that can create or compress DMG files. DMG creation relies heavily on Apple-specific tools and low-level disk formatting logic that's not easily replicated in pure .NET code without platform dependencies.

If you absolutely need to generate DMGs in .NET, your only practical (but non-cross-platform) workaround would be to invoke Apple's hdiutil command-line tool on macOS—but this breaks the platform-agnostic requirement you've specified.

Final Takeaway

For extracting files from standard, unencrypted DMGs, you can find workable fully managed .NET solutions. But for full compression or DMG creation, you're stuck without a platform-agnostic fully managed option right now.

内容的提问来源于stack exchange,提问作者Morten Frederiksen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 08:13:14