# bs-compression

> Bucklescript bindings for Compression middlewaare

Latest version **0.0.3** (published 2018-03-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install bs-compression
pnpm add bs-compression
yarn add bs-compression
bun add bs-compression
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2018-03-12 |
| First published | 2018-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 12.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yehonathan Sharvir |
| Maintainers | viebel |
| Keywords | bucklescript, compression, nodejs, middleware |

## Links

- npm: https://www.npmjs.com/package/bs-compression
- Repository: https://github.com/viebel/bs-compression
- Homepage: https://github.com/viebel/bs-compression#readme
- Issues: https://github.com/viebel/bs-compression/issues
- npm.io page: https://npm.io/package/bs-compression

## Dependencies (1)

- [compression](https://npm.io/package/compression.md) ^1.7.2

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2018-03-12
- 0.0.2 — 2018-03-04
- 0.0.1 — 2018-03-04

## README

# bs-compression
Bucklescript Bindings for [compression](https://github.com/expressjs/compression) express middleware.
`compression` is a Node.js compression middleware.

# Prerequisites

```
npm install --global bs-platform
yarn install
```

# How to compile

```
yarn build
```

# Usage 

This package can be used only with `bs-express`. Make sure you already have `bs-express` as a dependency in your project.

```
yarn add bs-compression
```
And add `bs-compression` to `dependencies` node of your `bsconfig.json`.

# Code snippets

For instance, here is the code to serve static files from `public` folder and compress them.
Remark: The compression middleware must be passed first in the array of middlewares.

```reason
let app = express();
App.useOnPathWithMany(
  app,
  ~path="/public",
  [|
  Compression.compression(),
  {
    let options = Static.defaultOptions();
    Static.make("public", options) |> Static.asMiddleware
  }
  |]
);
```

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