Data compression and learning in time sequences analysis