Crates.io | swf-emitter |
lib.rs | swf-emitter |
version | 0.14.0 |
source | src |
created_at | 2019-04-24 21:22:58.721383 |
updated_at | 2022-05-08 19:05:35.363523 |
description | SWF emitter |
homepage | https://github.com/open-flash/swf-emitter |
repository | https://github.com/open-flash/swf-emitter |
max_upload_size | |
id | 129962 |
size | 151,832 |
SWF emitter implemented in Rust.
Converts swf-types
movies to bytes.
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 compression is provided by the following features, enabled by default:
deflate
: enable support for CompressionMethod::Deflate
, using the miniz_oxide
crate.lzma
: enable support for CompressionMethod::Lzma
, using the lzma-rs
crate.Disabling these features will cause emit_swf
to return an error when passed the corresponding CompressionMethod
.
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.