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