sigidagi / weblzf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Web LZF

The purpose of this small project is mainly educational. My intension was to use some C library with a help of emscripten compiler to port that libary to nodejs (javascript) environment.

Required tools for building project:

  • emscripten compiler toolchain
  • cmake as build tool
git clone https://github.com/sigidagi/weblzf
cd weblzf/build
./configure
make

It will generate two files: binary webassembly file: weblzf.wasm and JavaScript file: weblzf.js containing glue code to translate between the native C functions, and JavaScript/wasm. Check build folder: weblzf/build

LZF C library

LibLZF is a compression/decompression library by Marc Lehmann. It aims for very high speeds and reasonable compression. It could be widely used in everything from BigTable and other large data sets like MapReduce and Hierarchical Data Formats HDF5

Some performance comparision between different compression algorithms LZF vs LZO vs Snappy vs ZLIB.

Usage

index.html provides example javascript code how to access LZF compression/decompression library. Run webserver using python (or similar server of your choice) from project root directory:

python3 -m http.server

check console logs on web browser

firefox http://localhost:8000

by pressing [F12]

License

This code is under a BSD license. This essentially means you can freely use it as long as you include the copyright statements as attribution. See the license file for details.

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C 72.8%Language:C++ 19.3%Language:HTML 5.3%Language:CMake 1.4%Language:Shell 1.2%