This guide covers the installation and setup for the Zstandard plugin and CLI across various platforms.
pubspec.yaml
zstandard
dependencies: zstandard: ^1.4.0 # android ios linux macos windows web
Ensure zstd.js and zstd.wasm are included in the web folder of your Flutter project. Set up your index.html to load the WebAssembly files correctly.
web
index.html
<!DOCTYPE html> <html> <head> <script src="zstd.js"></script> </head> </html>
Include the library inside the <head>
<head>
dependencies: zstandard_cli: ^1.4.0 # linux macos windows
Run dart pub get to install the CLI.
dart pub get
CLI Commands: To use the CLI, run:
dart run zstandard_cli:compress <file> <compression_level> dart run zstandard_cli:decompress <file.zstd>
There was an error while loading. Please reload this page.