How to encode data as sound?


Is there a way to encode a binary file on disk, then have it sent to the audio output stream as sound, and then decode that sound back to the original file ? The closest concept I can think to this is that of how an analog modem works (eg. file transfers over a PTSN / POTS line (public switched telephone network) with ZModem etc).

A use case would be to send a file in a laptop out the earphone / speaker, capture the sound using a mobile phone or microphone, and then decode the sound back to the original file. Therefore bypassing locked hardware interfaces (eg. USB, SATA, NIC, DVD-RW) or firewalls, proxies, suspicious activity monitors etc.