1. A method of compressing data comprised of first through sixth patterns having respective first through sixth values, where the first pattern precedes the second pattern in the data, the third pattern precedes the fourth pattern in the data, and the fifth pattern precedes the sixth pattern in the data, the method comprising: providing first compressed data comprising a first code and the second value if the second value exceeds the first value by more than a predetermined amount; providing second compressed data comprising a second code and a difference between the third and fourth values if the fourth value does not exceed the third value by more than the predetermined amount; providing third compressed data comprising the fifth value and the sixth value if the sixth value exceeds the fifth value by a predefined number; and storing, in memory at least one of the first compressed data, the second compressed data, and the third compressed data.