Skip to main content

snappy_neo 0.1.0 copy "snappy_neo: ^0.1.0" to clipboard
snappy_neo: ^0.1.0 copied to clipboard

Pure Dart implementation of Google's Snappy compression: fast block-format compress and decompress, with a zero-copy Bytes API powered by blit.

example/snappy_neo_example.dart

import 'dart:convert';
import 'dart:typed_data';

import 'package:snappy_neo/snappy_neo.dart';

void main() {
  final source = Uint8List.fromList(utf8.encode('snappy ' * 100));
  final compressed = Snappy.compress(source);
  final restored = Snappy.decompress(compressed);

  print('uncompressed: ${source.length} bytes');
  print('compressed:   ${compressed.length} bytes');
  print('restored:     ${restored.length} bytes');
  print('roundtrip ok: ${utf8.decode(restored) == utf8.decode(source)}');
}
0
likes
0
points
241
downloads

Publisher

verified publisherunk404.com

Weekly Downloads

Pure Dart implementation of Google's Snappy compression: fast block-format compress and decompress, with a zero-copy Bytes API powered by blit.

Repository (GitHub)
View/report issues

Topics

#compression #snappy #codec

License

unknown (license)

Dependencies

blit

More

Packages that depend on snappy_neo