Giter VIP home page Giter VIP logo

swf_file's Introduction

swf_file

Fork of Diogo Almeida swf_file to include LZMA support.

A Ruby Gem based on swfutil lib, by Dennis Zhuang. SWF File is lightweight gem to read swf file headers from within a Ruby application.

Ruby compatibility

Target version: 1.9.2dev Also compatible with: 1.9.1 and 1.8.7

Not tested with versions under 1.8.7. Should you use this lib with other ruby versions, please provide feedback.

Install

gem install swf_file

LICENSE

Please refer to the LICENSE file.

Example

header = SwfFile::FlashFile.header 'clicktag.swf' # load the file
# Access the various header options. Please check the unit tests for more usage examples.
puts header.size
puts header.compressed?
puts header.version
puts header.bit_count
puts header.xmax
puts header.ymax
puts header.width # In pixels
puts header.height # In pixels
puts header.frame_rate
puts header.frame_count
puts header.duration # In milliseconds
puts header.avm_version
puts header.signature
# You can also pass a block to SwfFile::FlashFile.header
puts SwfFile::FlashFile.header 'clicktag.swf' { |h| puts h.duration }
# It's also possible to create instances of SwfFile::FlashFile
swf = SwfFile::FlashFile.new 'clicktag.swf'
swf.header # => SwfHeader class instance equivalent to the return of SwfFile::FlashFile.header(<file>)
swf.header.duration
# Instances of SwfFile::FlashFile also receive blocks
swf.header { |h| h.duration }
# SwfFile::FlashFile instance helper method
swf.compressed? # => Helper method. Effectively it's an alias to same as SwfHeader#compressed?

Issues, improvements, feedback an suggestions

To report issues, please use GitHub’s issue manager (github.com/DBA/swf_file/issues). Meanwhile, feel free to fork the project and submit your modifications.

Should you wish to contact me directly, please use GitHub’s message box or the email available at the Rakefile.

Pending

  • Docs

swf_file's People

Contributors

joshuaostrom avatar

Watchers

 avatar Joshua Scott avatar Marlon Moyer avatar Patrick Sharp avatar Peter Berezny avatar Dan Swain avatar Justin Edwards avatar Josh Lehman avatar Peter Young avatar James Cloos avatar Matthew avatar mrlocus avatar John Graham avatar Tom LePage avatar Alec Jacobs avatar Lucas Corbin avatar Matt Craig avatar Daniel Long avatar  avatar Mike Berrow avatar  avatar Kurt Johnson avatar  avatar David Kaczowka avatar Michael Mooney avatar Jacob Paul Adkins avatar Daniel Gale avatar  avatar Reece Van Cleve avatar Mike O'Neill avatar  avatar Kyle Hogue avatar  avatar RuboCop avatar  avatar Joe Hughes avatar

Forkers

isabella232

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.