<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def decompress(data, compression, width, height, depth, version=1):
 """Decompress raw data. :param data: compressed data bytes. :param compression: compression type, see :py:class:`~psd_tools.constants.Compression`. :param width: width. :param height: height. :param depth: bit depth of the pixel. :param version: psd file version. :return: decompressed data bytes. """

    length = width * height * depth // 8

    result = None
    if compression == Compression.RAW:
        result = data[:length]
    elif compression == Compression.PACK_BITS:
        result = decode_packbits(data, height, version)
    elif compression == Compression.ZIP:
        result = zlib.decompress(data)
    else:
        decompressed = zlib.decompress(data)
        result = decode_prediction(decompressed, width, height, depth)

    assert len(result) == length, 'len=%d, expected=%d' % (
        len(result), length
    )

    return result