Documentation
¶
Index ¶
Constants ¶
View Source
const ( CompressionNone = iota CompressionZlib CompressionLZMA // Currently not implemented )
These represent possible Swf compression algorithm
View Source
const ( CodeTagEnd = 0 // CodeTagEnd is the code representing a Tag of type End CodeTagDoABC = 82 // CodeTagDoABC is the code representing a Tag of type DoABC )
These represent code of handled Swf tags
Variables ¶
View Source
var ErrMalformedHeader = errors.New("malformed header")
ErrMalformedHeader means that the swf file header is malformed. The signature is malformed
View Source
var ErrUnsupportedFile = errors.New("unsupported file")
ErrUnsupportedFile means that the swf file is not supported. The file is compressed with an unsupported algorithm
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct { Compression uint8 Version uint8 FileLength uint32 FrameSize Rect FrameRate float32 FrameCount uint16 }
Header represents a Swf file's header
type Reader ¶
type Reader interface { io.Reader io.Seeker ReadByte() (byte, error) ReadBits(n uint) (uint32, error) ReadInt8() (int8, error) ReadInt16() (int16, error) ReadInt32() (int32, error) ReadUInt8() (uint8, error) ReadUInt16() (uint16, error) ReadUInt32() (uint32, error) ReadEUInt32() (uint32, error) ReadBitValue(n uint8) (int32, error) ReadUBitValue(n uint8) (uint32, error) ReadFixed() (float32, error) ReadFixed8() (float32, error) ReadString() (string, error) }
Reader is the minimal interface required to read a swf
func NewReader ¶
func NewReader(r io.ReadSeeker) Reader
NewReader provides a simple way to create a Reader from a given io.Reader
Click to show internal directories.
Click to hide internal directories.