InfoQ Homepage News .NETZ – Compression and Packing for .NET Libraries

.NETZ – Compression and Packing for .NET Libraries


From the beginning, the .NET runtime had a decent packaging system based on a collection of assemblies. While far better than loose script files or collections of class files, it is not as convenient as statically linked executables or executable JARs. Vasian Cepa’s .NETZ gives developers the ability to compress .NET assemblies and pack them into a single executable file.

By default .NETZ supports compression using #ZipLib or .NET 2.0’s IO.Compression.DeflateStream. Additional compression providers can be created if necessary. Theoretically new compression providers can also include encryption, but no such providers are included out of the box.

There are some limitations. Localized resource DLLs are not supported in .NET 2.0 projects. Unlike .NET 1.0 and 1.1, the .NET 2.0 version doesn’t trigger the AssemblyResolve and ResourceResolve events needed to dynamically decompress the assemblies. There is however a workaround.

Another limitation of the system is that it doesn’t support native DLLs or DLLs created using managed C++. For the latter, this is caused because “the Managed C++ compiler optimizes the PE file and the IL metadata in ways that are not understood by the .NET generic Assembly loader methods”.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.