Microsoft make things complicated
来源:互联网 发布:用java打印乘法表 编辑:程序博客网 时间:2024/05/01 09:46
最近研究写NTFS驱动下的读写压缩/稀疏文件功能的时候被微软雷到了。
真不愧“微软让事情变得复杂 (Microsoft make things complicated)”的传闻。
压缩/占位流描述组居然可以分别存放到两个属性中.......彻底囧掉了......为了省几个字节的空间,代码复杂度起码提高一个数量级,犯得上么.......
然后又发现一个更囧的情况:NTFS属性中的流可以被任意拆开描述,一个10个簇长的流可以被写成10个1个簇的流!
比如:
11 08 10
LCN 10,LENGTH 08
完成可以被改成:
11 01 10 11 01 01 11 01 01 11 01 01 11 01 01 11 01 01 11 01 01 11 01 01
-_-b
也就是说,16个簇的压缩单元可能被写成16个流的描述,而不受压缩单元尺寸限制的稀疏文件,则存在无限可能......
而且还都能通过CHKDSK的检查并能被WINDOWS正常访问。
更可悲的是:这些流可能被拆开存放于多个属性中......虽然WINDOWS自身并不会这样做,但只要这是合法的,那别的程序就只能无条件的支持......
综上。非常简单的压缩/稀疏文件操作逻辑,理论上有演变成无聊,复杂,效率低下的多属性下流描述的修改操作的可能,而且事实上,程序必须处理此种状况。代码复杂度因为这个小小的设计巨增。
劳资痛恨微软那帮BT!
- Microsoft make things complicated
- Microsoft make things complicated part 2
- Things make us different
- Make things beautiful again !
- 《Make Things Move》实用公式
- little things make life great
- Make interesting things with react!
- WLAN Roaming - the basics Even if you keep the same IP address, things get complicated.
- WLAN Roaming - the basics Even if you keep the same IP address, things get complicated.
- 10 things that make software user-friendly
- Five things that make Go fast
- Retrospective--The Way To Make Things Better
- Five things that make Go fast
- 10 things to make your desktop database apps better
- The People Who Know Things Should Get to Make Decisions
- Go-Five things that make Go fast-学习笔记
- cocos2d js make things moving 之心跳运动
- 10 Things You Should Know About Microsoft's Silverlight
- C++中有关volatile关键字的作用--阻止编译器将其变量优化缓存到寄存器(和线程相关)(转自百度)
- C#常用正则表达式
- java中的同步与异步
- “无形参函数”利用汇编代码传递变量地址 [有点意思]
- 基于OPENGL的3D引擎-G3D 介绍
- Microsoft make things complicated
- 有关GSL(GNU Scientific Library)的简介 版本号:GSL Version 1.10
- mysql 中substring和replace的用法
- 有待练习的几道题 [待续]
- 手机开发平台指南、教程和资料介绍
- COM高手总结的八个经验和教训
- PyQt(2) 对话框
- 详谈调用winpcap驱动写arp多功能工具
- ANDROID SDK 1.5 - 包装索引