XLSX ZIP数据流格式说明

ZIP文件格式分析

				var headValue:int = bytes.readUnsignedInt();
				if(headValue != 0x04034b50)
				{
					break;
				}
				bytes.position = bytes.position + 14;//14=2解压文件所需 pkware最低版本2通用比特标志位(置比特0位=加密,详情见后)2压缩方式(详情见后)2文件最后修改时间2文件最后修改日期4CRC-32校验码
				var compressSize:int = bytes.readUnsignedInt();//压缩后的大小
				var uncompressSize:int = bytes.readUnsignedInt();//未压缩的大小
				var fileNameLength:int = bytes.readUnsignedShort();//文件名长度
				var otherLength:int = bytes.readUnsignedShort();//扩展区长度
				var fileName:String = bytes.readUTFBytes(fileNameLength);//文件名
				bytes.position = bytes.position + otherLength;//扩展区
				var fileByteArray:ByteArray = new ByteArray();
				if(compressSize != 0)
				{
					bytes.readBytes(fileByteArray,0,compressSize);
				}

在这里插入图片描述
文件头标识:0x04034b50

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章