Lz4Lib constructor
Lz4Lib(
- DynamicLibrary lib
Construct Lz4Lib with DynamicLibrary
Implementation
Lz4Lib(DynamicLibrary lib) {
getVersionNumber =
lib.lookupFunction<GetVersionNumberNative, GetVersionNumber>(
'ffi_lz4_version_number');
_getVersionString =
lib.lookupFunction<GetVersionStringNative, GetVersionString>(
'ffi_lz4_version_string');
getFrameVersionNumber =
lib.lookupFunction<GetFrameVersionNumberNative, GetFrameVersionNumber>(
'ffi_lz4f_get_version');
getCompressFrameBound =
lib.lookupFunction<GetCompressFrameBoundNative, GetCompressFrameBound>(
'ffi_lz4f_compress_frame_bound');
_compressFrame = lib.lookupFunction<CompressFrameNative, CompressFrame>(
'ffi_lz4f_compress_frame');
_createDecompressionContext =
lib.lookupFunction<Uint64 Function(Pointer), int Function(Pointer)>(
'ffi_lz4f_create_decompression_context');
_freeDecompressionContext =
lib.lookupFunction<Uint64 Function(Pointer), int Function(Pointer)>(
'ffi_lz4f_free_decompression_context');
_getFrameHeaderSize = lib.lookupFunction<
Uint64 Function(Pointer<Uint8>, Uint64),
int Function(Pointer<Uint8>, int)>('ffi_lz4f_header_size');
_decompressFrame =
lib.lookupFunction<DecompressFrameNative, DecompressFrame>(
'ffi_lz4f_decompress');
}