dart_native_compression 1.1.0+4 copy "dart_native_compression: ^1.1.0+4" to clipboard
dart_native_compression: ^1.1.0+4 copied to clipboard

A dart binding to native compression libraries, including lz4@1.9.3.

example/example.md

Getting Started #

import 'dart:ffi';
import 'package:dart_native_compression/dart_native_compression.dart';

final lz4 = Lz4Lib(lib: DynamicLibrary.open('libnative_compression.so'));
print('LZ4 version number: ${lz4.getVersioinNumber()}');

To compress data into a lz4 frame

final compressedFrame = lz4.compressFrame(data);

To decompress a lz4 frame with a single function

final decompressed = lz4.decompressFrame(compressedFrame);

To decompress a lz4 frame with stream api

await for (final decompressedChunk
    in lz4.decompressFrameStream(compressedStream)) {
    // Your logic here
}

To get more examples #

Go to unit test

2
likes
140
points
5
downloads

Publisher

unverified uploader

Weekly Downloads

A dart binding to native compression libraries, including lz4@1.9.3.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

collection, ffi

More

Packages that depend on dart_native_compression