# @volue/wasm-codecs-gifsicle

> Gifsicle codec in WebAssembly.

Latest version **1.0.0** (published 2022-12-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @volue/wasm-codecs-gifsicle
pnpm add @volue/wasm-codecs-gifsicle
yarn add @volue/wasm-codecs-gifsicle
bun add @volue/wasm-codecs-gifsicle
```

## 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.0 |
| Published | 2022-12-22 |
| First published | 2022-12-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 296.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 68 |
| Author | Cyril Wanner |
| Maintainers | fima1, adka |
| Keywords | wasm, webassembly, image, codec, gifsicle |

## Links

- npm: https://www.npmjs.com/package/@volue/wasm-codecs-gifsicle
- Repository: https://github.com/cyrilwanner/wasm-codecs
- Homepage: https://github.com/cyrilwanner/wasm-codecs/tree/master/packages/gifsicle#readme
- Issues: https://github.com/cyrilwanner/wasm-codecs/issues
- npm.io page: https://npm.io/package/@volue/wasm-codecs-gifsicle

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-12-22

## README

# `@wasm-codecs/gifsicle` [![npm version](https://badgen.net/npm/v/@wasm-codecs/gifsicle)](https://www.npmjs.com/package/@wasm-codecs/gifsicle) [![license](https://badgen.net/github/license/cyrilwanner/wasm-codecs)](https://github.com/cyrilwanner/wasm-codecs/blob/master/LICENSE) [![downloads](https://badgen.net/npm/dt/@wasm-codecs/gifsicle)](https://www.npmjs.com/package/@wasm-codecs/gifsicle)

> Gifsicle WebAssembly Codec

## Table of contents

1. [Installation](#installation)
1. [Usage](#usage)
1. [API](#api)
1. [Examples](#examples)
1. [License](#license)

## Installation

```bash
npm install @wasm-codecs/gifsicle
```

**Requirements:**
- Node.js 10 or later

## Usage

```typescript
import encode from '@wasm-codecs/gifsicle';

(async () => {
  const encodedImage = await encode(image, encodeOptions);
})();
```

## API

### `encode(image, encodeOptions?): Buffer`

Returns a buffer containing the compressed image data.

##### `image: Buffer`

Buffer of a GIF image.

##### `encodeOptions?: EncodeOptions`

All encoding options are optional and fall back to the [default values](https://github.com/cyrilwanner/wasm-codecs/blob/master/packages/gifsicle/src/options.ts#L3-L6).

```typescript
type EncodeOptions = {
  optimizationLevel?: number;
  interlaced?: boolean;
  colors?: number;
  width?: number;
  height?: number;
}
```

## Examples

### Using Node.js

```typescript
import fs from 'fs';
import encode from '@wasm-codecs/gifsicle';

(async () => {
  // read input image as a buffer
  const data = fs.readFileSync('in.gif');

  // encode the image using @wasm-codecs/gifsicle
  const output = await encode(data);

  // save the image to the file system
  fs.writeFileSync('out.png', output);
})();
```

## License

Licensed under the [MIT](https://github.com/cyrilwanner/wasm-codecs/blob/master/LICENSE) license.

© Copyright Cyril Wanner

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