public static void ReadStruct <T>(byte[] Array, ref T Struct, bool IsBigEnddian = false, Encoding Encoding = null)
        {
            MemoryStream Stream = new MemoryStream(Array);
            StructReader Reader = new StructReader(Stream, IsBigEnddian, Encoding);

            Reader.ReadStruct(ref Struct);
            Reader.Close();
            Stream?.Close();
        }
예제 #2
0
        public static void ReadStruct(byte[] Array, ref object Struct, Encoding Encoding = null)
        {
            MemoryStream Stream = new MemoryStream(Array);
            StructReader Reader = new StructReader(Stream, Encoding);

            Reader.ReadStruct(ref Struct);
            Reader.Close();
            Stream?.Close();
        }
예제 #3
0
        public static void ReadStruct <T>(byte[] Array, ref T Struct, bool IsBigEnddian = false, Encoding Encoding = null, long BaseOffset = 0)
        {
            MemoryStream Stream = new MemoryStream(Array);
            StructReader Reader = new StructReader(Stream, IsBigEnddian, Encoding);

            Reader.Seek(BaseOffset, SeekOrigin.Begin);
            Reader.ReadStruct(ref Struct);
            Reader.Close();
            Stream?.Close();
        }