Skip to main content

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

Command-line interface for compressing and decompressing files with Zstandard.

example/zstandard_cli_example.dart

import 'dart:typed_data';

import 'package:zstandard_cli/zstandard_cli.dart';

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

  final originalData = Uint8List.fromList([
    10,
    20,
    30,
    10,
    20,
    30,
    10,
    20,
    30,
    0,
    20,
    30,
    10,
    20,
    30,
    10,
    20,
    30,
    10,
    20,
    30,
    10,
    20,
    30,
    10,
    20,
    30,
    0,
    20,
    30,
    10,
    20,
    30,
    10,
    20,
    30,
    10,
    20,
    30,
    10,
    20,
    30,
    10,
    20,
    30,
    0,
    20,
    30,
    10,
    20,
    30,
    10,
    20,
    30
  ]);
  print('originalData: ${originalData.length}');

  final compressed = await cli.compress(originalData, compressionLevel: 3);
  print('compressed: ${compressed?.length}');

  final decompressed = await cli.decompress(compressed ?? Uint8List(0));
  print('decompressed: ${decompressed?.length}');
}
1
likes
140
points
205
downloads
screenshot

Documentation

API reference

Publisher

verified publishervyp.dev

Weekly Downloads

Command-line interface for compressing and decompressing files with Zstandard.

Homepage
Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

ffi, path, platform, zstandard_native

More

Packages that depend on zstandard_cli