swf-util是一个使用Ruby读取swf头信息(高度、宽度、文件大小、帧数等等)、压缩和解压缩swf文件的工具类库,改写自
java版本。
项目主页:
http://code.google.com/p/swf-util/
协议:MIT License
平台:JRuby or c
ruby 1.8.x on linux
依赖BitStruct,请到
这里下载安装bit-struct。在windows上的Ruby Zlib的实现有问题,linux下正常,使用JRuby也可以。
使用例子:
#
read swf head
require
'
swf_util
'
header
=
SwfUtil::read_header(
"
test.swf
"
) puts header.inspect header.version header.frame_rate header.width header.frame_count
#
decompress swf
SwfUtil::decompress_swf(
"
test.swf
"
)
#
compress swf
SwfUtil::compress_swf(
"
test.swf
"
)
相关资源:敏捷开发V1.0.pptx