Struct swf_headers::SwfHeaders [] [src]

pub struct SwfHeaders { /* fields omitted */ }

The primary struct, managing all the parsing and storage of SWF header information.

Methods

impl SwfHeaders
[src]

[src]

Wraps over read_from(), taking a path and opening it for you.

Examples

use swf_headers::SwfHeaders;
if let Ok((headers, decoded)) = SwfHeaders::open("example.swf") {
    // ...
}

[src]

Takes a SWF file and parses its headers, returning the header struct along with a readable DecodedSwf if you wish to continue parsing the file.

The vast bulk of SWF parsing happens in here. The code is documented, so you can read through the source if you want to understand how it all works.

Examples

use std::fs::File;
use swf_headers::SwfHeaders;
if let Ok(file) = File::open("example.swf") {
    let (headers, decoded) = SwfHeaders::read_from(file).unwrap();
    // ...
}

[src]

Returns the signature as an enum representing all valid values.

[src]

Returns the version number.

[src]

Returns the uncompressed total file length in bytes.

[src]

Returns the dimensions in twips (the measurement unit flash uses, 1/20th of a pixel).

[src]

Returns the dimensions in pixels (converted from twips, sometimes losing accuracy).

[src]

Returns the frame rate (note: does not yet handle fractional framerates).

[src]

Returns the frame count.

Trait Implementations

impl Copy for SwfHeaders
[src]

impl Clone for SwfHeaders
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for SwfHeaders
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Debug for SwfHeaders
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for SwfHeaders

impl Sync for SwfHeaders