英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论