WriteLEInt() public méthode

Write an int value in little endian order.
public WriteLEInt ( int value ) : void
value int
Résultat void
Exemple #1
0
        byte[] MakeLocalHeader(string asciiName, short versionToExtract, short flags, short method,
            int dostime, int crc, int compressedSize, int size)
        {
            using ( TrackedMemoryStream ms = new TrackedMemoryStream())
            {
                ms.WriteByte((byte)'P');
                ms.WriteByte((byte)'K');
                ms.WriteByte(3);
                ms.WriteByte(4);

                ms.WriteLEShort(versionToExtract);
                ms.WriteLEShort(flags);
                ms.WriteLEShort(method);
                ms.WriteLEInt(dostime);
                ms.WriteLEInt(crc);
                ms.WriteLEInt(compressedSize);
                ms.WriteLEInt(size);

                byte[] rawName = Encoding.ASCII.GetBytes(asciiName);
                ms.WriteLEShort((short)rawName.Length);
                ms.WriteLEShort(0);
                ms.Write(rawName, 0, rawName.Length);
                return ms.ToArray();
            }
        }