综合

img flashvan

SWF文件格式说明书--SWF文件头

发表于2004/9/30 11:03:00  11235人阅读

分类: flash

 

SWF文件头

字段

类型

备注

标识

8

标识字节:

F代表未压缩

C代表已压缩(SWF6以后的版本特有)

标识

8

代表W

标识

8

代表S

版本号

8

代表SWF文件的版本,比如0x06代表SWF6

文件长度

32

整个文件的所占的字节数

帧大小

RECT结构

SWF场景的大小,单位为1twip1/20像素)

帧速度

16

 

帧数

16

影片总的帧数目

 

The header begins with a three-byte Signature of either 0x46, 0x57, 0x53 (FWS) or 0x46,

0x57, 0x43 (CWS). An FWS signature indicates an uncompressed SWF file; CWS indicates

that the entire file after the first 8 bytes (that is, after the FileLength field) has been compressed using the open standard ZLIB. The data format used by the ZLIB library is described by Request for Comments (RFCs) documents 1950 to 1952. CWS file compression is only permitted in SWF version 6 or later.

文件头以三个标识符开始,他们不是0x46, 0x57, 0x53 (FWS)就是0x46,0x57, 0x43 (CWS).一个FWS标识表示该文件是未压缩文件.CWS标识表示整个文件,在前八个字节,也就是文件长度字段之后所有的内容,都是开放标准ZLIB压缩过的.用ZLIB库的数据格式,在1950 1952年的Request for Comments (RFCs)文档中有所描述.CWS仅在SWF6以后才允许使用.

 

A one-byte Version number follows the signature. The version number is not an ASCII character,but an 8-bit number. For example, for SWF 4 the version byte is 0x04, not the ASCII character4 (0x35).

在标识符之后的一个字节是版本号.这个版本号不是一个ASCII字符,而是一个8位的数字.例如,SWF4文件的版本号是0x04,不是ASCII字符4”(0x35)

 

The FileLength field is the total length of the SWF file including the header. If this is an

uncompressed SWF (FWS signature), the FileLength field should exactly match the file size. If

this is a compressed SWF (CWS signature), the FileLength field indicates the total length of the

file after decompression, and thus will generally not match the file size. Having the uncompressed size available can make the decompression process more efficient.

文件长度字段代表包括文件头整个文件的总长度.如果是一个未压缩的SWF文件(FWS标识符),文件长度字段表示文件的精确大小;如果是一个压缩的SWF文件(CWS标识),文件长度字段表示解压后文件的大小,这样一般就不是实际文件的大小了.让未压缩(解压后)的大小可见,则可以使解压过程更加有效.

 

The FrameSize field defines the width and height of the movie. This is stored as a RECT

structure, meaning that its size may vary according to the number of bits needed to encode the

coordinates. The FrameSize RECT always has Xmin and Ymin of 0; the Xmax and Ymax

members define the width and height (see Using Bit Values).

帧大小字段表示影片的宽度和高度.它存在一个RECT结构中,表示它的大小可以根据坐标(四个点的坐标)数值的变化而变化.文件大小RECT通常是这样的形式:XminYmin成员都为0XmaxYmax成员声明宽度和高度.(参考Using Bit Values一节)

 

The FrameRate is the desired playback rate in frames per second. This rate is not guaranteed if the

SWF file contains streaming sound data, or Flash Player is running on a slow CPU.

帧速率表示理想的每秒播放帧数.如果SWF文件包含声音流数据,或者Flash播放器运行在一个慢的CPU上,这个速率是不能保证的.

The FrameCount is the total number of frames in this SWF movie.

帧数表示SWF影片总的帧数目.

 

(本文谢绝转载,欢迎指正错误! ^_^)

阅读全文
0 0

相关文章推荐

img
取 消
img