有没有比fopen fread更加快速的读取文件头少量字节内容的方法??

农村的我 2017-08-10 10:37:42
如下读取文件头前512字节:
char chrbuf[512] = { 0 };

FILE* pfile = _wfopen(wcfilePath, L"rb");
if (pfile)
{
fread(chrbuf, 512, 1, pfile);


fclose(pfile);

}
想问下各位大神们,有没有比这效率更高的方法,获取文件头少量字节的方法,感激不尽!!!!!
...全文
796 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2017-08-10
  • 打赏
  • 举报
回复
FDump - Dumping File Sectors Directly from Disk using Logical Offsets http://www.codeproject.com/Articles/32169/FDump-Dumping-File-Sectors-Directly-from-Disk-usin
赵4老师 2017-08-10
  • 打赏
  • 举报
回复
引用 2 楼 business122 的回复:
[quote=引用 1 楼 zhao4zhong1 的回复:] FDump - Dumping File Sectors Directly from Disk using Logical Offsets http://www.codeproject.com/Articles/32169/FDump-Dumping-File-Sectors-Directly-from-Disk-usin
codeproject 确实很不错,但是为什么代码down不了了现在..[/quote] 有偿提供,人民币100,支付宝zhao4zhong1@163.com QQ511606848
weixin_38305120 2017-08-10
  • 打赏
  • 举报
回复
我比较喜欢c++标准库的fstream
农村的我 2017-08-10
  • 打赏
  • 举报
回复
引用 1 楼 zhao4zhong1 的回复:
FDump - Dumping File Sectors Directly from Disk using Logical Offsets http://www.codeproject.com/Articles/32169/FDump-Dumping-File-Sectors-Directly-from-Disk-usin
codeproject 确实很不错,但是为什么代码down不了了现在..

5,530

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 模式及实现
社区管理员
  • 模式及实现社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧