internal PpmdProperties(int allocatorSize, int modelOrder, SharpCompress.Compressor.PPMd.I1.ModelRestorationMethod modelRestorationMethod) { this.Version = PpmdVersion.I1; this.AllocatorSize = allocatorSize; this.ModelOrder = modelOrder; this.ModelRestorationMethod = modelRestorationMethod; }
public PpmdProperties(byte[] properties) { this.Version = PpmdVersion.I1; if (properties.Length == 2) { ushort num = BitConverter.ToUInt16(properties, 0); this.AllocatorSize = (((num >> 4) & 0xff) + 1) << 20; this.ModelOrder = (num & 15) + 1; this.ModelRestorationMethod = (SharpCompress.Compressor.PPMd.I1.ModelRestorationMethod) (num >> 12); } else if (properties.Length == 5) { this.Version = PpmdVersion.H7z; this.AllocatorSize = BitConverter.ToInt32(properties, 1); this.ModelOrder = properties[0]; } }
public PpmdProperties(byte[] properties) { this.Version = PpmdVersion.I1; if (properties.Length == 2) { ushort num = BitConverter.ToUInt16(properties, 0); this.AllocatorSize = (((num >> 4) & 0xff) + 1) << 20; this.ModelOrder = (num & 15) + 1; this.ModelRestorationMethod = (SharpCompress.Compressor.PPMd.I1.ModelRestorationMethod)(num >> 12); } else if (properties.Length == 5) { this.Version = PpmdVersion.H7z; this.AllocatorSize = BitConverter.ToInt32(properties, 1); this.ModelOrder = properties[0]; } }