I don’t know if this question should go here or in another site, so please move it if you think so!
I was thinking that, as a file is basically 1s and 0s, could it be possible to create a file that contains (for example) an image and a mp3? The method I was thinking is just using odd byte positions for one type and even ones for another. Of course this would imply having a special file reader for this.
Am I missing something? Or maybe this is already being done in some places and you could give me an example
Thanks
Of course this is possible. For another example, consider what happens if you compress an image and a sound file using zip, or create a disk image (using e.g. Disk Utility on the Mac)
Many programs use resource formats which can contain multiple types of data. For example the WAD files used by the original Doom game.
You could also think about encapsulating binary files inside an XML file.
However, there is little practical value in doing this yourself using your own encoding – you should use open standards such as the ones above.