Run Length Encoding C++ Sequence Methods

The RLE C++ Sequence methods take one input argument (except rleDecode()) and produce a result sequence or scalar type as described below:

mco_seq_rle_count_t rleCount(int pos) const
Returns the number of repeating items in the current tile for the iterator at position pos. For regular non-RLE sequences, it always returns 1.
Sequence<T> rleDecode() const
Converts an RLE sequence to a "normal" sequence.

Example

Following is an example code snippet demonstrating an RLE function:

    {
        mco_trans_h trans;
        mco_cursor_t quote_cursor;
        Quote quote;
        mco_seq_iterator_t rle_high_iterator, normal_high_iterator;
        MCO_RET rc;
        ...

        for (rc = mco_cursor_first(trans, &quote_cursor);
            rc != MCO_S_CURSOR_END;
            rc = mco_cursor_next(trans, &quote_cursor))
        {
            Quote_from_cursor(trans, &quote_cursor, &quote);
            Quote_high_iterator(&quote, &rle_high_iterator);

            normal_high_iterator = rle_high_iterator.rleDecode();
            ...
        }
        ...
    }