Chain-link compression of arbitrary black-white images