Skip to main content

zstd_neo 0.1.2 copy "zstd_neo: ^0.1.2" to clipboard
zstd_neo: ^0.1.2 copied to clipboard

Pure Dart implementation of Zstandard (zstd): a complete decoder and a streaming encoder, running on the Dart VM, JavaScript and WebAssembly.

example/zstd_neo_example.dart

import 'dart:convert';

import 'package:zstd_neo/zstd_neo.dart';

void main() {
  const text =
      'zstd_neo is a pure Dart Zstandard codec. '
      'It runs on the Dart VM, in JavaScript and in WebAssembly.';
  final original = utf8.encode(text);

  final codec = ZstdCodec(level: 3);
  final compressed = codec.encode(original);
  final restored = codec.decode(compressed);

  print('original:   ${original.length} bytes');
  print('compressed: ${compressed.length} bytes');
  print('restored:   ${utf8.decode(restored) == text}');
}
0
likes
160
points
204
downloads

Documentation

API reference

Publisher

verified publisherunk404.com

Weekly Downloads

Pure Dart implementation of Zstandard (zstd): a complete decoder and a streaming encoder, running on the Dart VM, JavaScript and WebAssembly.

Repository (GitHub)
View/report issues

Topics

#zstd #zstandard #compression #codec

License

MIT (license)

Dependencies

blit

More

Packages that depend on zstd_neo