public PpmdStream(PpmdProperties properties, Stream stream, bool compress) { this.properties = properties; this.stream = stream; this.compress = compress; if (properties.Version == PpmdVersion.I1) { model = new Model(); if (compress) { model.EncodeStart(properties); } else { model.DecodeStart(stream, properties); } } if (properties.Version == PpmdVersion.H) { modelH = new ModelPPM(); if (compress) { throw new NotImplementedException(); } modelH.decodeInit(stream, properties.ModelOrder, properties.AllocatorSize); } if (properties.Version == PpmdVersion.H7z) { modelH = new ModelPPM(); if (compress) { throw new NotImplementedException(); } modelH.decodeInit(null, properties.ModelOrder, properties.AllocatorSize); decoder = new Decoder(); decoder.Init(stream); } }