What exactly causes binary file “gibberish”?

后端 未结 7 1148
醉话见心
醉话见心 2020-12-30 02:11

I haven\'t found an answer to this particular question; perhaps there isn\'t one. But I\'ve been wondering for a while about it.

What exactly causes a binary file to

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-30 02:42

    Binary data is often very random. Encrypted data in particular, by definition. Each byte can be represented by one of 256 characters (leaving Unicode out of the equation). ASCII only covers 128 of these, and only 94 of these are actual printable characters. Outside the ASCII range, you have a number of international characters and strange symbols. There are certainly more than 128 of these, so one must specify a codepage to select a specific set of symbols.

    Anyway, since binary files can be represented as a very random assortment of familiar and unfamiliar characters, the file will look like gibberish if you open it in an editor.

    You could always open a file (binary or text file, there really is no difference) in a hex editor, and look at the raw binary data.

    There is no way to tell which program created a specific file. In particular, if the program has encrypted its data, all hope is lost. Otherwise, it is often easy to recognize certain "signatures."

提交回复
热议问题