将二进制转换为其原始格式

huangapple go评论68阅读模式
英文:

Binary to it's original format

问题

Is there any possible way to determine the original format of a binary file?

如果没有,请告诉我们,但如果是的话,那么如何确定?

What makes a binary format file of pdf different with binary format of a txt file?

PDF文件的二进制格式与文本文件的二进制格式有什么不同?

Also, can we convert a binary file into its original format without knowing its original format?

另外,我们是否可以在不知道原始格式的情况下将二进制文件转换回其原始格式?

Kindly help.
请帮助。谢谢!

英文:

Is there any possible way to determine the original format of a binary file?

If No, then we are on the same page, but if yes, then how?
What makes a binary format file of pdf different with binary format of a txt file?

Also, can we convert a binary file into it's original format without knowing it's original format?

Kindly help.
Thank you!

答案1

得分: 2

最终,每个文件只是一串字节流。决定文件类型的是程序尝试解析和使用它的方式(当然还有一些共同的约定)。

一些文件内部包含一个魔术字符串,可以帮助程序快速检查(但实际上并不检查,因为文件的其余部分可能已损坏)文件是否属于某种类型,您可以在这里看到一些示例:https://en.wikipedia.org/wiki/List_of_file_signatures

英文:

Eventually, every file is just a stream of bytes. What determines the type of the file is how a program attempts to parse and use it (And of course there are some common agreements).

Some files are created with a magic string inside them that helps a program quickly check (but not actually check as the rest of the file might be corrupted) if a file is of some type, you can see some examples here: https://en.wikipedia.org/wiki/List_of_file_signatures

huangapple
  • 本文由 发表于 2020年8月13日 18:37:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/63393296.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定