1. An image encoding method for compressing image data representing plural pixels of plural nonzero image tones, the method comprising: designating, by a computing device, a current pixel to be encoded and defining a context region that includes multiple context pixels that are adjacent the current pixel, each of the context pixels having an image tone; quantizing, by the computing device, the context region, wherein the quantizing includes determining a state for the context region, the state defined by an indication of a number of unique image tones among the context pixels in the context region and an indication of an arrangement of the unique image tones; and encoding, by the computing device, the current pixel with reference to the quantization of the context region.