2.3.6 • Published 6 months ago

@types/iltorb v2.3.6

Weekly downloads
9,075
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for iltorb 2.3
// Project: https://github.com/MayhemYDG/iltorb
// Definitions by: Arturas Molcanovas <https://github.com/Alorel>
//                 Francis Gulotta <https://github.com/reconbot>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2

/// <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: Thu, 08 Jul 2021 14:23:08 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

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

2.3.4

7 months ago

2.3.6

6 months ago

2.3.5

7 months ago

2.3.3

3 years ago

2.3.2

4 years ago

2.3.1

4 years ago

2.3.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago