zstandard_cli 1.0.0 zstandard_cli: ^1.0.0 copied to clipboard
CLI implementation of zstandard. For desktops.
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}');
}