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

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