• bleistift2@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months ago

    @MentalEdge@sopuli.xyz is right. I’ll interpret your question as “can I send this to someone and they will be able to play it” – then the answer is yes. You can take a binary file like mp4, pretend it’s text like I did above, and send it via chat or a lemmy post. The recipient will need to copy that text, enter it in, for instance, notepad++ and save the file on their disk. Renaming the file from the-text.txt to the-text.mp4 should be sufficient for any audio player to pick the file up and play it.

    • dohpaz42@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 months ago

      Not entirely true. There are bits in binary files that cannot be rendered correctly by text editors. In fact, if a text editor cannot read a bit, it might omit it or substitute it with a generic placeholder. Instead, what you would do is encode the file into a text format and the transmit it to somebody, who would then decode the text back into its original file format.

      This is how email attachments and uploading/downloading files from the web work. Usually that text format is called base64. In email attachments, they go one step further and typically limit the encoded data to fixed length lines called chunks.

      But yeah, sending raw binary data as text requires special formatting first. Opening it up in a text editor and copying and pasting is not enough.