最好的方法读/写在小二进制数据或大端用C#? [英] Best approach to write/read binary data in Little or Big Endian with C#?

查看:90
本文介绍了最好的方法读/写在小二进制数据或大端用C#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,如果我有一个二进制文件的连接codeD无论是在小尾数或在.NET大端,究竟是读/写操作的最佳方法是什么?

Ok, if i've got a binary file encoded either in little endian or big endian under .NET, what is the best way to read / write to it?

在.NET框架我只成功地发现了用小尾数为默认BinaryWritters / BinaryReaders,所以我的方法是实现自己的BinaryReader在/ BinaryWritter于大端读/书面方式的数据,但我不知道是否有一个更好的形式给出。

In the .NET framework i've only managed to found BinaryWritters / BinaryReaders which use little endian as default, so my approach was implement my own BinaryReader / BinaryWritter for reading / writting data in big endian, but I wonder if there is a better aproach.

推荐答案

我喜欢这一个:

其他工具库

这篇关于最好的方法读/写在小二进制数据或大端用C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆