@types/iltorb
TypeScript icon, indicating that this package has built-in type declarations

2.3.6 • Public • Published

Installation

npm install --save @types/iltorb

Summary

This package contains type definitions for iltorb (https://github.com/MayhemYDG/iltorb).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/iltorb.

index.d.ts

/// <reference types="node"/>

import { Transform } from "stream";

export type BrotliMode = 0 | 1 | 2;
export type BrotliCompressionQuality = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;

export interface BrotliEncodeParams {
    disable_literal_context_modeling?: boolean | undefined;
    lgblock?: number | undefined;
    lgwin?: number | undefined;
    /** @default 0 */
    mode?: BrotliMode | undefined;
    /** @default 11 */
    quality?: BrotliCompressionQuality | undefined;
    size_hint?: number | undefined;
}

export interface BrotliFlushable {
    flush(): void;
}

export type IltorbCallback = (err: Error | null | undefined, output: Buffer) => void;

export function compress(buffer: Buffer, options: BrotliEncodeParams, callback: IltorbCallback): void;
export function compress(buffer: Buffer, callback: IltorbCallback): void;
export function compress(buffer: Buffer, options?: BrotliEncodeParams): Promise<Buffer>;

export function decompress(buffer: Buffer, callback: IltorbCallback): void;
export function decompress(buffer: Buffer): Promise<Buffer>;

export function compressSync(buffer: Buffer, options?: BrotliEncodeParams): Buffer;
export function decompressSync(buffer: Buffer): Buffer;

export function compressStream(options?: BrotliEncodeParams): Transform & BrotliFlushable;
export function decompressStream(): Transform;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Arturas Molcanovas, and Francis Gulotta.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/iltorb

Weekly Downloads

29,889

Version

2.3.6

License

MIT

Unpacked Size

5.51 kB

Total Files

5

Last publish

Collaborators

  • types