TSWFParser class (Delphi)

Download

e-mail

 

Description:

The SWF parser class was designed to help decode and encode Macromedia Flash style files (SWF files). I took a lot of "inspiration" from David Michie's swfparse.cpp sample.

SWF files are a collection of SWF records. Each record contains a small header (with type and record size). SWF record fields are bit-packed, and decoding them is sometimes difficult.

Features:

1- Implements the complicated SWF bit packing mechanism (read and write).

2- Enumerates SWF file records. Identifies the record types.

3- Decodes the contents of some of the record types (tagPlaceObject2, tagDefineBitsLossless2, tagDefineBitsJPEG2).

4- Test application (exe and source).

Required 3rd party code (both freeware):

1- Anders Melanders GIFImage component (used for color quantization)

2- Base2 ZLibEx (for lossless image encoding/decoding)

License: Source released as freeware (no distribution restrictions).

Help wanted: Please send any code you change, for sharing.

History:

2003-apr-24 Released version 1.0 - Omar Reis