9 releases (breaking)
0.14.0 | May 8, 2022 |
---|---|
0.13.0 | Jul 24, 2021 |
0.12.0 | Sep 5, 2020 |
0.11.1 | Feb 6, 2020 |
0.3.1 | Apr 26, 2019 |
#166 in Video
25 downloads per month
120KB
3K
SLoC
SWF Emitter
SWF emitter implemented in Rust.
Converts swf-types
movies to bytes.
Usage
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");
}
Features
SWF compression is provided by the following features, enabled by default:
deflate
: enable support forCompressionMethod::Deflate
, using theminiz_oxide
crate.lzma
: enable support forCompressionMethod::Lzma
, using thelzma-rs
crate.
Disabling these features will cause emit_swf
to return an error when passed the corresponding CompressionMethod
.
Contributing
This repo uses Git submodules for its test samples:
# 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
This library is a standard Cargo project. You can test your changes with
cargo test
.
Prefer non-master
branches when sending a PR so your changes can be rebased if
needed. All the commits must be made on top of master
(fast-forward merge).
CI must pass for changes to be accepted.
Dependencies
~0.8–1.5MB
~33K SLoC