def decode(source, destination, major_key, minor_key):
    'Decode from source to destination via Major and Minor Keys.'
    _check_major(major_key)
    _check_minor(minor_key)
    map_1 = [(byte >> shift) & 3 for byte in map(ord, minor_key) for shift in xrange(6, -2, -2)]
    map_2 = _setup_major(major_key)
    double_word = source.read(4)
    while double_word:
        destination.write(map_2[(map_1[ord(double_word[0])] << 6) + (map_1[ord(double_word[1])] << 4) + (map_1[ord(double_word[2])] << 2) + map_1[ord(double_word[3])]])
        double_word = source.read(4)
    destination.flush()
Decode from source to destination via Major and Minor Keys.
recipes/Python/577008_Profile_Manager_21/recipe-577008.py