As shown in previous research, data compression techniques can be successfully used in time series forecasting. The problem is that there exist many different data compression algorithms and it's unknown in advance which one will be the best for predicting a specific time series. In this study, we use an approach known as time-universal data compression to quickly select a close to optimal algorithm. Its basic idea is to compress only a part of the input data using each of the available compressors in order to select the best one. Then the data is compressed using the selected algorithm only. We implemented this approach and used it to predict real-world data such as sunspot numbers and the ionospheric T-index. The results of our computations show that the approach is quite effective and can be useful in practice.