zstandard_cli 1.3.27 copy "zstandard_cli: ^1.3.27" to clipboard
zstandard_cli: ^1.3.27 copied to clipboard

CLI implementation of zstandard. For desktops.

pub package

zstandard_cli #

The command-line implementation of zstandard.

Zstandard (zstd) is a fast compression algorithm developed by Meta (formerly Facebook) for real-time scenarios. It provides a flexible range of compression levels, enabling both high-speed and high-compression-ratio options. This makes it ideal for applications needing efficient data storage, transmission, and backup solutions.

zstandard_cli is a Dart package that binds to the high-performance Zstandard compression library, enabling both in-code and command-line compression and decompression. It leverages FFI to directly access native Zstandard functionality, allowing efficient data processing in Dart applications, from in-memory data compression to file handling via the CLI.

Available on macOS, Windows, and Linux desktops only.

macOS Windows Linux
x64 ✔️ ✔️ ✔️
arm64 ✔️ ✔️ ✔️
Precompiled Yes Yes Yes

Note: This is a pure Dart package for desktop usage. For Flutter, please see the zstandard plugin.

Basic Usage #

void main() async {
  var cli = ZstandardCLI();

  final originalData = Uint8List.fromList([...]);

  final compressed = await cli.compress(originalData, compressionLevel: 3);

  final decompressed = await cli.decompress(compressed ?? Uint8List(0));
}

With extensions:

void main() async {
  final originalData = Uint8List.fromList([...]);

  final compressed = await originalData.compress(compressionLevel: 3);

  final decompressed = await compressed.decompress();
}

CLI Usage #

dart run zstandard_cli:compress any_file 3

dart run zstandard_cli:decompress any_file.zstd

The images provided below illustrate how to use zstandard_cli for compression and decompression on different platforms.

1
likes
130
points
58
downloads
screenshot

Publisher

verified publisherlandamessenger.com

Weekly Downloads

CLI implementation of zstandard. For desktops.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

ffi, path, platform

More

Packages that depend on zstandard_cli