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