zl程序教程

您现在的位置是:首页 >  其他

当前栏目

发布swf-util 0.01

2023-03-14 10:20:13 时间
  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")