A method of compressing a stream of pixel data relative a two-dimensional
object, pixels of which are scanned by rows from a source device to a
receiver device, includes defining an extended context window to include
a pair of pixels following a last encoded pixel on the row being scanned
and the respective triplets of neighboring pixels belonging to the
preceding row. The method includes defining a first distinct context
array of pixels of the extended context window for the pixel of the pair
immediately following the last encoded pixel, and a second context array
of pixels of the extended context window for the other pixel of the pair.
An extended context value relative to each pixel of the pair is
calculated, and the extended context value relative to a first pixel
immediately following the last encoded pixel is compared with an extended
threshold. If the extended context value is less than the extended
threshold, then encoding the first and second pixels of the pair, and if
the extended context value relative to the first pixel of the pair
exceeds the extended threshold, then carrying out simultaneously a
parallel processing and encoding of both pixels according to an encoding
routine.