javascript - Binary to it's original format
问题描述
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!
解决方案
最终,每个文件都只是一个字节流。决定文件类型的是程序如何尝试解析和使用它(当然也有一些共同的协议)。
某些文件是在其中创建的带有魔术字符串的,可帮助程序快速检查(但实际上不检查,因为文件的其余部分可能已损坏)如果文件属于某种类型,您可以在此处查看一些示例:https:// en.wikipedia.org/wiki/List_of_file_signatures
推荐阅读
- python-3.x - 弹出 VBA 宏关闭
- c# - ASP.NET 核心 3.1 在 GET 请求上呈现输入字段的值不正确的表单
- java - 将查询参数传递给flyway中的连接字符串
- c# - System.CommandLine 解析的值与输入不匹配
- c# - 为什么 ASP.NET 不反序列化我的 post 方法参数?
- google-cloud-functions - 云函数运行多次而不是一次
- .net - 授权服务帐户时客户端出现未授权错误
- r - 使用过滤器 dplyr 过滤 df 中的现有值失败
- javascript - 使用 AudioDecoder 分块解码作品
- python - 如何使 Pandas Timestamp 对象可下标?