tidepool-org / lzo-wasm

LZO decompression in the browser using FFmpeg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

LZO decompression in the browser using FFmpeg

License:BSD 2-Clause "Simplified" License


Languages

Language:JavaScript 35.7%Language:C 25.3%Language:Shell 17.6%Language:Python 14.6%Language:HTML 6.7%