Apple, localization, media Open source

svga

A pure-Rust codec for SVGA animations: read, inspect, edit losslessly, write back.

svga is to SVGA what the png crate is to PNG. It reads SVGA 2.x, zipped 2.x, and 1.x files into one typed model, and edits 2.x files losslessly so untouched fields are written back byte for byte. It treats input as hostile, with size limits, checked arithmetic, and stable error codes, and it builds for wasm32. It deliberately does no rendering or playback.

What it does

  • Reads SVGA 1.x and 2.x
  • Byte-preserving lossless edits
  • Hardened against malformed input

Try it

  • cargo add svga
  • cargo run --example inspect -- gift.svga
  • document.replace_image("img_12", &optimized_png)?

Character

Opens animations without breaking them Jeweler's loupe over a gift box