C#定位文件位置并修改字节数据
作者:互联网
http://blog.sina.com.cn/s/blog_94a1fe540102ympb.html
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace fixMp4 { class Program { static void Main(string[] args) { Console.WriteLine("hello world!"); string mp4file = "D:\\fixTool\\cannotPlayCs.mp4"; FileStream writeStream = File.OpenWrite(mp4file); byte[] newData = new byte[4]; newData[0] = 0x00; newData[1] = 0x50; newData[2] = 0x00; newData[3] = 0x08; writeStream.Seek(32, SeekOrigin.Begin); writeStream.Write(newData, 0, newData.Length); writeStream.Close(); } } }标签:定位,字节,C#,0x00,System,using,newData,writeStream,string 来源: https://www.cnblogs.com/chinasoft/p/14837077.html