SWF file format manual - SWF file header

xiaoxiao2021-03-06  66

SWF file header

Field Type Remark Identifier 8-bit identification byte: f represents uncompressed c represents compressed (SWF6) Identifies 8-bit representative W I identify 8 bits of 8 bits representing the version of the SWF file, such as 0x06 represents SWF6 file The length of the 32-bit full file occupied byte number frame size Rect structure SWF scene size, unit is 1TWIP (1/20 pixel) frame speed 16 bits

Frame number 16-bit movie total frame number

The Header Begins with a Three-byte Signature of Either 0x46, 0x57, 0x53 ("fws") or 0x46,

0x57, 0x43 ("cws"). An fws signature indeicates an uncompressed swf file; cws indeicates

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.

The file head starts with three identifiers, they are not 0x46, 0x57, 0x53 ("fws") is 0x46, 0x57, 0x43 ("cws"). A FWS identifier indicates that the file is an uncompressed file. The CWS identifier represents the entire file, in the first eight bytes, that is, all the contents of the file length field, are compressed by open standard ZLIB. With the data format of the Zlib library, there is a description in the Request for Comments (RFCS) documentation in 1950 to 1952. CWS is only allowed after 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 Asci Character '

4

'

(0x35).

One byte after the identifier is the version number. This version number is not an ASCII character, but an 8-bit number. For example, the version number of the SWF4 file is 0x04, not ASCII characters.

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 A Compressed SWF (CWS Signature), The FileLength Field Indicates The Total Length of The Total Length Of

File After Decompression, and Thus Will Generally NOT Match The File Size. Having The Uncompressed Size Available Can Make The Decompression Process More Efficient. File Length field represents the total length of the full file of the file header. If it is an uncompressed SWF file (FWS identifier), the file length field represents the exact size of the file; if it is a compressed SWF file (CWS ID), the file length field represents the size of the file after decompression, so general is not actual The file size is. If the size of uncompressed (after decompression) is visible, the decompression process can be made more effective.

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 To

Coordinates. The frameesize rect always HAS Xmin and ymin of 0; the xmax and ymax

Members Define The Width and Height (See Using Bit Values).

The frame size field represents the width and height of the movie. It exists in a RECT structure, indicating that its size can vary depending on the value of the coordinate (coordinate of the four points). File size RECT is usually in this form: Xmin and Ymin members are 0; XMAX and YMAX members declare width and height. (Refer to the Using Bit Values ​​section)

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.

The frame rate represents the ideal number of play frames per second. If the SWF file contains sound stream data, or the flash player runs on a slow CPU, this rate is not guaranteed.

The Framecount Is The Total Number of Frames In this SWF MOVIE.

The number of frames represents the number of frames of the SWF movie.

(This article is declined, welcome to correct the error! ^ _ ^)

转载请注明原文地址:https://www.9cbs.com/read-111542.html

New Post(0)