Learning markov chains in fractal compression of image data