1. A lithographic apparatus, comprising: an array of individually controllable elements that modulate a beam of radiation; a compressed pattern memory that stores a compressed representation of a requested dose pattern to be formed on a substrate by the modulated beam; and a dictionary decompressor that at least partially decompresses the compressed representation, wherein the dictionary decompressor comprises a first dictionary memory that is an external dictionary memory, a first dictionary decoder that at least partially decompresses at least a part of the compressed representation by extracting, from the first dictionary memory, portions of pattern data corresponding to references to the first dictionary memory contained in the compressed representation, and a second dictionary decoder, having an internal dictionary memory, that at least partially decompresses at least a part of the compressed representation by extracting, from the internal dictionary memory, portions of pattern data corresponding to references to the internal dictionary memory contained in the compressed representation, wherein the requested dose pattern comprises two groups of repeating pattern features; and the dictionary decompressor is configured so that: the external dictionary memory stores pattern data corresponding to a first of the groups, and the internal dictionary memory stores pattern data corresponding to a second of the groups, wherein the repeating pattern features in the first group are larger than the repeating pattern features in the second group.