# @types/lz4js

> TypeScript definitions for lz4js

Latest version **0.2.2** (published 2025-10-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/lz4js
pnpm add @types/lz4js
yarn add @types/lz4js
bun add @types/lz4js
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

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

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2025-10-27 |
| First published | 2024-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51448 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/lz4js
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lz4js
- npm.io page: https://npm.io/package/@types/lz4js

## Recent versions

- 0.2.2 (latest) — 2025-10-27
- 0.2.1 (ts4.7) — 2024-04-10
- 0.2.0 — 2024-03-29

## README

# Installation
> `npm install --save @types/lz4js`

# Summary
This package contains type definitions for lz4js (https://github.com/Benzinga/lz4js).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lz4js.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lz4js/index.d.ts)
````ts
// Type definitions for lz4js 0.2.0
// Project: https://github.com/Benzinga/lz4js

export function compressBound(n: number): number;

export function decompressBound(src: Uint8Array | number[]): void;

export function compress(src: Uint8Array | number[], maxSize?: number): Uint8Array;

export function decompress(src: Uint8Array | number[], maxSize?: number): Uint8Array;

export function compressBlock(
    src: Uint8Array | number[],
    dst: Uint8Array | number[],
    sIndex: number,
    sLength: number,
    hashTable: ArrayLike<number>,
): number;

export function decompressBlock(
    src: Uint8Array | number[],
    dst: Uint8Array | number[],
    sIndex: number,
    sLength: number,
    dIndex: number,
): number;

export function compressFrame(src: Uint8Array | number[], dst: Uint8Array): number;

export function decompressFrame(src: Uint8Array | number[], dst: Uint8Array): number;

export function makeBuffer(size: number): Uint8Array;

````

### Additional Details
 * Last updated: Mon, 27 Oct 2025 22:02:21 GMT
 * Dependencies: none

# Credits
These definitions were written by [hu0529](https://github.com/hu0529).

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