A decoder (10) decodes compressed data. A memory (44) stores the
compressed data and stores operating data and operating code for a
plurality of decompression algorithms requiring different amounts of
memory for the operating data and operating code and requiring different
amounts of memory to store compressed data corresponding to a
predetermined amount of uncompressed data. A processor (42) is arranged
to select one of the decompression algorithms, to allocate an amount of
the memory for storing compressed data and operating data and operating
code depending on the decompression algorithm selected and to decode the
compressed data stored in the allocated amount of memory.