Skip to content

tidepool-org/lzo-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lzo-wasm

Decompress using LZO in the browser using Ffmpeg

Introduction

lzo-wasm is a WebAssembly version of the the LZO implementation in FFMpeg's libavutil library.

lzo-wasm works in the browser. For Node.js, use lzo-decompress instead.

This software uses code of FFmpeg licensed under the LGPLv3 and its source can be downloaded here.

Usage

import LZO from 'lzo-wasm';

const decompressed = await LZO.decompress(input, length);

Building from source

Run build.sh.

Scripts:

  • build.sh - clones the FFmpeg repo and builds from source using Docker
  • build-lzo-with-docker.sh - builds from source using Docker
  • build-lzo.sh - builds if Emscripten is available

Example in browser

  • In wasm/, run python3 -m http.server 8080
  • In your browser, open http://localhost:8080/main.html
  • Click Choose File and select the y.lzo LZO-compressed file
  • Check your web console for the decompressed data