forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bl.d.ts
40 lines (34 loc) · 1.58 KB
/
bl.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Type definitions for BufferList v0.8.0
// Project: https://github.com/rvagg/bl
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module 'bl' {
import stream = require('stream');
class BufferList extends stream.Duplex {
new (callback?:(err:Error, buffer:Buffer) => void): void;
append(buffer: Buffer):void;
get(index: number): number;
slice(start?: number, end?: number): Buffer;
copy(dest: Buffer, destStart?: number, srcStart?: number, srcEnd?: number): void;
duplicate(): BufferList;
consume(bytes?: number): void;
toString(encoding?: string, start?: number, end?: number): string;
length: number;
readDoubleBE(offset: number, noAssert?: boolean): number;
readDoubleLE(offset: number, noAssert?: boolean): number;
readFloatBE(offset: number, noAssert?: boolean): number;
readFloatLE(offset: number, noAssert?: boolean): number;
readInt32BE(offset: number, noAssert?: boolean): number;
readInt32LE(offset: number, noAssert?: boolean): number;
readUInt32BE(offset: number, noAssert?: boolean): number;
readUInt32LE(offset: number, noAssert?: boolean): number;
readInt16BE(offset: number, noAssert?: boolean): number;
readInt16LE(offset: number, noAssert?: boolean): number;
readUInt16BE(offset: number, noAssert?: boolean): number;
readUInt16LE(offset: number, noAssert?: boolean): number;
readInt8(offset: number, noAssert?: boolean): number;
readUInt8(offset: number, noAssert?: boolean): number;
}
export = BufferList;
}