如何将文件变成原始的bitstring?
如何读取文件并将其转换为原始位字符串?例如,我打开一个512KB的映像,它通过字节读取文件,并且吐出了文件是文件的长字符串?我想对字符串应用一些功能,但我无法找到一种始终如一地解开文件的方法。
我想我需要的是通过字节读取文件字节的内容,不关心原始文件格式...正如Byte读取字节时,创建了一个巨大的整数文件bit String。
我使用了Python的位生成器和Numpy,似乎运行良好,但是该程序对实际文件的行为不佳。将文件分配到1和0的最佳方法是什么?
如何读取任何文件并将内容存储为易于阅读的十六进制文件?还是bin文件?以及如何阻止“打开”函数截断领先0!
啊!
使用Python或Golang,如何打开任何文件并创建一个不间断的内容字符串,其中字节读取中的每个引导零都很重要?
How do I read a file and turn it to a RAW bit string? For example I open an image that is 512kb, It reads the file byte by byte, and it spits out the long bit string that is the file? I would like to apply some functions to the strings but I can't figure a way to unpack files consistently.
I imagine what I need is something that reads a file byte by byte with no care of the original file format... As it reads byte by byte, a giant integer like thing file bit string is created.
I used a Python's bit generator and NumPy, that seemed to work well, but The program didn't behave well with actual files. What is the best way to unpack files into 1's and 0's?
How do I read any file and store the contents as an easy to read HEX file? or BIN file? And how do I stop the "open" function from truncating leading 0's!
UGH!
Using Python or GOLANG, how do I open any file and create an uninterrupted bit string of the contents where every leading zero in a BYTE read is significant?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在寻找并询问大家之后,我很熟悉我的答案。将任何文件变成原始十六进制字符串的最佳方法是
After looking and asking everyone I'm acquainted to I found my answer. The best way to turn any file into a RAW HEX string is by