I’ve noticed some files I opened in a text editor have all kinds of crazy unrenderable chars

  • @cheese_greaterOP
    link
    26 hours ago

    How is it representing it tho? Like does it have woven in there an array of hexcode colors for every microscopic pixel that makea up the picture.

    Are images and audio files just arrays of frames which are arrays of pixels and sound units?

    • Admiral Patrick
      link
      fedilink
      English
      3
      edit-2
      6 hours ago

      It just converts the raw binary data into character encoding, so it doesn’t matter what the source is (image, video, database file, etc). The source binary data is taken 6 bits at a time, then this group of 6 bits is mapped to one of 64 unique characters.

      The decoding process is just the reverse of that: mapping the data back to binary form.

      https://en.wikipedia.org/wiki/Base64