mirror of
https://github.com/minescope/mineping.git
synced 2024-12-27 10:35:48 +00:00
11 lines
449 B
TypeScript
11 lines
449 B
TypeScript
export default varint;
|
|
declare namespace varint {
|
|
function encodeInt(val: number): Buffer;
|
|
function encodeString(val: string): Buffer;
|
|
function encodeUShort(val: number): Buffer;
|
|
function concat(chunks: Buffer[]): Buffer;
|
|
function decodeInt(buffer: Buffer, offset: number): number;
|
|
function decodeString(val: Buffer, offset?: number): string;
|
|
function decodeLength(val: number): 5 | 7 | 8 | 1 | 2 | 3 | 4 | 6 | 9 | 10;
|
|
}
|