public void BasicTest()
        {
            var model = new ArithmeticCodingDataModel
            {
                DataToCode    = "Multi",
                Probabilities = new List <Pair <char, BigDouble> >
                {
                    new Pair <char, BigDouble>('M', new BigDouble(1, 10)),
                    new Pair <char, BigDouble>('u', new BigDouble(3, 10)),
                    new Pair <char, BigDouble>('l', new BigDouble(3, 10)),
                    new Pair <char, BigDouble>('t', new BigDouble(2, 10)),
                    new Pair <char, BigDouble>('i', new BigDouble(1, 10))
                }
            };

            var result = ArithmeticCodingService.PerformArithmeticCoding(model);

            Assert.AreEqual("0.81602", result.LowerBound.ToString());
            Assert.AreEqual("0.8162", result.UpperBound.ToString());
        }
 private void DoCodingAsync(object sender, DoWorkEventArgs e)
 {
     this.result = ArithmeticCodingService.PerformArithmeticCoding(this.model);
     this.lowerFractionResult = this.result.LowerBound.ToString();
     this.upperFractionResult = this.result.UpperBound.ToString();
 }