public ReplayHeader(FileStream p_stream)
        {
            using (BinaryReader r = new BinaryReader(p_stream, Encoding.UTF8, true))
            {
                // the magic byte identifiers
                m_magic = r.ReadBytes(6);

                // file hash
                m_signature = r.ReadBytes(256);

                // various lengths and offsets
                m_headerLength = r.ReadInt16();
                m_fileLength = r.ReadInt32();
                m_metadataOffset = r.ReadInt32();
                m_metadataLength = r.ReadInt32();
                m_payloadHeaderOffset = r.ReadInt32();
                m_payloadHeaderLength = r.ReadInt32();
                m_payloadOffset = r.ReadInt32();

                // json metadata
                m_metadata = ReplayMetadata.Deserialize(r.ReadBytes(m_metadataLength));
            }
        }
        public ReplayHeader(Stream p_stream)
        {
            using (BinaryReader r = new BinaryReader(p_stream, Encoding.UTF8, true))
            {
                // the magic byte identifiers
                Magic = r.ReadBytes(6);

                // file hash
                Signature = r.ReadBytes(256);

                // various lengths and offsets
                m_headerLength        = r.ReadInt16();
                m_fileLength          = r.ReadInt32();
                MetadataOffset        = r.ReadInt32();
                MetadataLength        = r.ReadInt32();
                m_payloadHeaderOffset = r.ReadInt32();
                m_payloadHeaderLength = r.ReadInt32();
                PayloadOffset         = r.ReadInt32();

                // json metadata
                m_metadata = ReplayMetadata.Deserialize(r.ReadBytes(MetadataLength));
            }
        }