C# 替换二进制文件中的 HEX
我有一个二进制文件,其中有一些应该更改的值。 更准确地说,在文件的两个部分,在开始时,有两个十六进制值
66 73 69 6D 35 2E 36 39
应该更改为
4D 53 57 49 4E 34 2E 31
如何尽可能快地执行此异步操作?我已经将整个文件读入 byte[] 数组,但该类没有搜索或替换功能。
I have a binary file, where are a few values what should be changed.
To be more exact, at two part of the file, in the beginning, there are two HEX values
66 73 69 6D 35 2E 36 39
what should be changed to
4D 53 57 49 4E 34 2E 31
How could I do this async, and as fast as possible? I've got to the point where I read the whole file into a byte[] array, but this class has no search or replace feature.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我编写的一个方法,您可以使用它来查找
byte[]
中您要查找的字节。Here is a method I wrote which you can use to find where in your
byte[]
the bytes are that you are trying to find.