9 个版本 (破坏性更新)
| 0.14.0 | 2022年5月8日 |
|---|---|
| 0.13.0 | 2021年7月24日 |
| 0.12.0 | 2020年9月5日 |
| 0.11.1 | 2020年2月6日 |
| 0.3.1 | 2019年4月26日 |
#150 在 视频
每月30次下载
120KB
3K SLoC
SWF Emitter
使用 Rust 实现的 SWF 播发器。将 swf-types 电影 转换为字节。
用法
use swf_emitter::emit_swf;
use swf_types::{CompressionMethod, Movie};
fn main() {
let movie: Movie = ...;
let swf_bytes = emit_swf(&movie, CompressionMethod::None)
.expect("Failed to emit movie");
}
功能
以下功能提供了 SWF 压缩,默认启用
deflate: 启用对CompressionMethod::Deflate的支持,使用miniz_oxide包。lzma: 启用对CompressionMethod::Lzma的支持,使用lzma-rs包。
禁用这些功能会导致 emit_swf 在传递相应的 CompressionMethod 时返回错误。
贡献
此仓库使用 Git 子模块进行测试样本
# Clone with submodules
git clone --recurse-submodules git://github.com/open-flash/swf-emitter.git
# Update submodules for an already-cloned repo
git submodule update --init --recursive --remote
此库是一个标准的 Cargo 项目。您可以使用 cargo test 命令测试您的更改。
发送 PR 时请优先考虑非 master 分支,以便在需要时重新合并您的更改。所有提交都必须在 master 的基础上进行(快进合并)。CI 必须通过才能接受更改。
依赖项
~0.8–1.6MB
~35K SLoC