/// <summary>
        /// Erzeugt die Binärrepräsentationen dieser Tabelle.
        /// </summary>
        /// <returns>Die gewünschte Repräsentation.</returns>
        public TableCreator CreateBinary()
        {
            // Create new
            TableCreator creator = new TableCreator();

            // Process all
            foreach (HuffmanTable table in Tables)
            {
                // Get the raw code
                char from = (HuffmanItem.StartOrEnd == table.Source[0]) ? '\0' : table.Source[0];

                // Process all
                foreach (HuffmanItem item in table.Items)
                {
                    // Get the raw code
                    char to = (HuffmanItem.StartOrEnd == item.Target[0]) ? '\0' : ((HuffmanItem.PassThrough == item.Target[0]) ? char.MaxValue : item.Target[0]);

                    // Register all
                    foreach (string sequence in item.AllSequences)
                    {
                        creator.AddTransition(from, to, HuffmanItem.GetSequencePattern(sequence), item.Sequence.Length);
                    }
                }
            }

            // Report
            return(creator);
        }
        public string this[char target]
        {
            get
            {
                // Find the item
                HuffmanItem item = FindItem(target);

                // Report
                return((null == item) ? null : item.Sequence);
            }
            set
            {
                // Validate
                if ((target < '\x0001') || (target > '\x007f'))
                {
                    if ((target != HuffmanItem.StartOrEnd) && (target != HuffmanItem.PassThrough))
                    {
                        throw new ArgumentException(target.ToString(), "target");
                    }
                }

                // Check mode
                if (null == value)
                {
                    // Simply remove
                    Items.RemoveAll(i => i.Target[0] == target);
                }
                else
                {
                    // Deep validation
                    ValidateSequence(value);

                    // Find the item
                    HuffmanItem item = Items.Find(i => i.Target[0] == target);

                    // Check mode
                    if (null != item)
                    {
                        // Just update
                        item.Sequence = value;
                    }
                    else
                    {
                        // Create new and add to list
                        Items.Add(new HuffmanItem {
                            Target = new string( new char[] { target } ), Sequence = value
                        });
                    }
                }
            }
        }
        /// <summary>
        /// Vergleicht die Übergangssequenzen erst nach Länge und dann nach Inhalt.
        /// </summary>
        /// <param name="other">Die andere Übergangsinstanz.</param>
        /// <returns>Ein Vergleichswert.</returns>
        internal int CompareTo(HuffmanItem other)
        {
            // Length
            int cmp = Sequence.Length.CompareTo(other.Sequence.Length);

            // No match
            if (0 != cmp)
            {
                return(cmp);
            }

            // Use sequences themselves
            int delta = Sequence.CompareTo(other.Sequence);

            // Process
            if (0 != delta)
            {
                return(delta);
            }
            else
            {
                return(string.Compare(AlternateSequences, other.AlternateSequences));
            }
        }
        /// <summary>
        /// Vergleicht die Übergangssequenzen erst nach Länge und dann nach Inhalt.
        /// </summary>
        /// <param name="other">Die andere Übergangsinstanz.</param>
        /// <returns>Ein Vergleichswert.</returns>
        internal int CompareTo( HuffmanItem other )
        {
            // Length
            int cmp = Sequence.Length.CompareTo( other.Sequence.Length );

            // No match
            if (0 != cmp)
                return cmp;

            // Use sequences themselves
            int delta = Sequence.CompareTo( other.Sequence );

            // Process
            if (0 != delta)
                return delta;
            else
                return string.Compare( AlternateSequences, other.AlternateSequences );
        }