Namespace: var_int

bitmessage/structs. var_int

Methods

(static) decode(buf) → {Object}

Decode var_int.

Parameters:
Name Type Description
buf Buffer

A buffer that starts with encoded var_int

Source:
Returns:

Decoded var_int structure.

Type
Object

(static) encode(value) → {Buffer}

Encode number into var_int.

Parameters:
Name Type Description
value number | Buffer

Input number

Source:
Returns:

Encoded var_int.

Type
Buffer