1. Within a computerized environment having at least one central processing unit for processing incoming data to perform one of compression or decompression, a method comprising: providing a stream of incoming data from at least one data source directed to at least one data destination; processing the stream of incoming data using a pattern classifier into a single stream of messages; generating one or more pattern events; for compression, encoding messages using a message encoder that changes an internal state in response to the at least one pattern event; and for decompression, decoding messages using a message decoder that changes an internal state in response to the at least one pattern event.