swf.stream
index
stream.py

 
Modules
       
math
struct

 
Classes
       
__builtin__.object
SWFStream

 
class SWFStream(__builtin__.object)
    SWF File stream
 
  Methods defined here:
__init__(self, file)
Initialize with a file object
bin(self, s)
Return a value as a binary string
calc_max_bits(self, signed, values)
Calculates the maximim needed bits to represent a value
close(self)
Closes the stream
read(self, count=0)
Read
readACTIONRECORD(self)
Read a SWFActionRecord
readCLIPACTIONRECORD(self, version)
Read a SWFClipActionRecord
readCLIPACTIONS(self, version)
Read a SWFClipActions
readCLIPEVENTFLAGS(self, version)
Read a SWFClipEventFlags
readCURVEDEDGERECORD(self, num_bits)
Read a SWFShapeRecordCurvedEdge
readCXFORM(self)
Read a SWFColorTransform
readCXFORMWITHALPHA(self)
Read a SWFColorTransformWithAlpha
readEncodedU32(self)
Read a encoded unsigned int
readFB(self, bits)
Read a float using the specified number of bits
readFILLSTYLE(self, level=1)
Read a SWFFillStyle
readFILTER(self)
Read a SWFFilter
readFIXED(self)
Read a 16.16 fixed value
readFIXED8(self)
Read a 8.8 fixed value
readFLOAT(self)
Read a float
readFLOAT16(self)
Read a 2 byte float
readFOCALGRADIENT(self, level=1)
Read a SWFFocalGradient
readGLYPHENTRY(self, glyphBits, advanceBits)
Read a SWFGlyphEntry
readGRADIENT(self, level=1)
Read a SWFGradient
readGRADIENTRECORD(self, level=1)
Read a SWFColorTransformWithAlpha
readKERNINGRECORD(self, wideCodes)
Read a SWFKerningRecord
readLANGCODE(self)
Read a language code
readLINESTYLE(self, level=1)
Read a SWFLineStyle
readLINESTYLE2(self, level=1)
Read a SWFLineStyle2
readMATRIX(self)
Read a SWFMatrix
readMORPHFILLSTYLE(self, level=1)
Read a SWFMorphFillStyle
readMORPHGRADIENT(self, level=1)
Read a SWFTextRecord
readMORPHGRADIENTRECORD(self)
Read a SWFTextRecord
readMORPHLINESTYLE(self, level=1)
Read a SWFMorphLineStyle
readRECT(self)
Read a SWFMatrix
readRGB(self)
Read a RGB color
readRGBA(self)
Read a RGBA color
readSB(self, bits)
Read a signed int using the specified number of bits
readSHAPE(self, unit_divisor=20)
Read a SWFShape
readSHAPEWITHSTYLE(self, level=1, unit_divisor=20)
Read a SWFShapeWithStyle
readSI16(self)
Read a signed short
readSI32(self)
Read a signed int
readSI8(self)
Read a signed byte
readSTRAIGHTEDGERECORD(self, num_bits)
Read a SWFShapeRecordStraightEdge
readSTYLECHANGERECORD(self, states, fill_bits, line_bits, level=1)
Read a SWFShapeRecordStyleChange
readSYMBOL(self)
Read a SWFSymbol
readString(self)
Read a string
readTEXTRECORD(self, glyphBits, advanceBits, previousRecord=None, level=1)
Read a SWFTextRecord
readUB(self, bits)
Read a unsigned int using the specified number of bits
readUI16(self)
Read a unsigned short
readUI32(self)
Read a unsigned int
readUI8(self)
Read a unsigned byte
readZONEDATA(self)
Read a SWFZoneData
readZONERECORD(self)
Read a SWFZoneRecord
readbits(self, bits, bit_buffer=0)
Read the specified number of bits from the stream
readraw_tag(self)
Read a SWFRawTag
readtag_header(self)
Read a tag header
reset_bits_pending(self)
Reset the bit array
seek(self, pos, whence=0)
Seek
skip_bytes(self, length)
Skip over the specified number of bytes
tell(self)
Tell

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
FLOAT16_EXPONENT_BASE = 15

 
Functions
       
int32(x)
Return a signed or unsigned int