Compression Methods

Feb 11, 2016 at 8:54 PM
Edited Feb 11, 2016 at 9:53 PM
Does anyone know what type of compression methods Wix is using?
What is the default?

Can we select the type of compression we want in WixSharp?

(This pertains to an MSI file.)

Feb 11, 2016 at 10:19 PM
I found out that if we add to the attributedefinitions we can specify compression for what becomes a <Media> element.
project.Media.AttributeDefinitions += ";CompressionLevel=high"
This reference has all the attributes that are available:

NOTE: not all of the attributes are implemented.

Based on this page:

The valid values for "CompressionLevel" are:
  • high
  • medium
  • low
  • mszip
  • none
Oleg, is there any way we can get this attribute exposed as a C# property? I'm still trying to wrap my head around how the project builds the XML so I don't feel comfortable writing code to submit for you.
Feb 13, 2016 at 3:53 AM
OK, Done. The next release will deliver a complete support Media element:

Implementing Media is actually quite easy as it maps straightforward into a single child XML element of the Product element:
public enum CompressionLevel
public class Media : WixObject
    public int Id = 1;
    public CompressionLevel? CompressionLevel;
    public bool? EmbedCab = true;
    public XContainer ToXml()
        return new XElement("Media")
//in Compiler.GenerateWixProj