예제 #1
0
        public void Expand()
        {
            int N = input.ReadInt();

            // Read two bits; write char.
            for (int i = 0; i < N; i++)
            {
                char c = input.ReadChar(2);
                output.Write(Alphabet.Dna.ToChar(c), 8);
            }
            output.Close();
            input.Close();
        }
예제 #2
0
        public void Expand()
        {
            bool b = false;

            while (!input.IsEmpty)
            {
                int run = input.ReadInt(LG_R);
                for (int i = 0; i < run; i++)
                {
                    output.Write(b);
                }
                b = !b;
            }
            output.Close();
        }