# quirc-wasm-module

> Quirc wasm module compiled using Emscripten written in C programming language.

Latest version **1.0.4** (published 2020-01-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install quirc-wasm-module
pnpm add quirc-wasm-module
yarn add quirc-wasm-module
bun add quirc-wasm-module
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2020-01-15 |
| First published | 2019-12-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Jacky Efendi |
| Maintainers | jackyef |
| Keywords | WASM, Web, Assembly, Quirc., JpegLib, Emscripten, QrCode, Scanner, web-worker |

## Links

- npm: https://www.npmjs.com/package/quirc-wasm-module
- Repository: https://github.com/jackyef/quirc-wasm
- Homepage: https://github.com/jackyef/quirc-wasm#readme
- Issues: https://github.com/jackyef/quirc-wasm/issues
- npm.io page: https://npm.io/package/quirc-wasm-module

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2020-01-15
- 1.0.3 — 2020-01-10
- 1.0.2 — 2020-01-10
- 1.0.1 — 2019-12-31
- 1.0.0 — 2019-12-31

## README

# Quirc-JpegLib WASM
## Wasm Module (compiled using Emscripten) to decode qr code image based on quirc and jpeglib.

### Size of the WASM module
The size of the raw WASM module is 250 KB, the gzipped version is 74 KB. The Javascript glue code size is 24 KB, the gzipped version is 7.4 KB.

### How to install on your Node JS Application?
Install the package and peer dependencies using your favorite Node Js package manager.

    yarn add quirc-wasm-emcc memory-fs fs-extra
    
Add the webpack plugin to your webpack configuration

    const QuircWasmPclugin = require('quirc-wasm-emcc/dist/webpack-plugins');
    
    webpackConfig = {
      plugins: [
        // other plugins
        new QuircWasmPclugin(), // put this last
      ],
    }

Import the function.

    import {decodeQrCode} from "quirc-wasm-emcc";

Take the jpeg blob, read that blob as array buffer, and pass that array buffer to decodeQrCode function.

    canvas.toBlob(blob => {
        const reader = new FileReader();
        reader.addEventListener("loadend", () => {
            const arrayBuffer = reader.result;
            const result = decodeQrCode(arrayBuffer);
            console.log(result);
        });
        reader.readAsArrayBuffer(blob);
    }, 'image/jpeg');import {decodeQrCode} from "quirc-wasm-emcc";

---
_Source: https://npm.io/package/quirc-wasm-module · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
