Magic encode files