zoukankan      html  css  js  c++  java
  • 字节序

    $.字节序是指多字节数据在计算机内存中存储或者网络传输时各字节的存储顺序。

    $.一个多字节数据按照其存储地址从低到高排列,如果最低有效字节在最高有效字节的前面,则称小端序;反之则称大端序。

    $.因为字符串是一个字节一个字节编码的,所以不存在大小端问题。

    $.注1
    public static byte[] BitConverter.GetBytes(int value);

    The order of bytes in the array returned by the GetBytes method depends on whether the computer
    architecture is little-endian or big-endian.

    $.注2
    public static readonly bool BitConverter.IsLittleEndian;

    This value is true if the architecture is little-endian; false if it is big-endian.

    $.注3
    public virtual int BinaryReader.ReadInt32();
    public virutal int BinaryWriter.WriteInt32();

    BinaryReader使用小端序读取数据;类似的,BinaryWriter也使用小端序写入数据。

    $.参考
    http://www.cnblogs.com/jeffreyzhao/archive/2010/02/10/byte-order-and-related-library.html

  • 相关阅读:
    CSS 基本语法
    Html 块
    Html 表单
    Html 创建表格
    Html 建立超链接
    Html 在网页中使用图像
    CentOS7 重启问题
    Java 多线程——多线程的引入
    c++ 自然排序-window文件排序
    MFC更改图标
  • 原文地址:https://www.cnblogs.com/codingthings/p/4326604.html
Copyright © 2011-2022 走看看