Namespace: var_str

bitmessage/structs. var_str

Methods

(static) decode(buf) → {DecodeResult}

Decode var_str.
NOTE: rest references input buffer.

Parameters:
Name Type Description
buf Buffer

A buffer that starts with encoded var_str

Source:
Returns:
Type
DecodeResult

(static) encode(str) → {Buffer}

Encode string into var_str.

Parameters:
Name Type Description
str string

A string

Source:
Returns:

Encoded var_str.

Type
Buffer

Type Definitions

DecodeResult

Type:
  • Object
Properties:
Name Type Description
str number

The string itself

length number

var_str full length

rest Buffer

The rest of the input buffer

Source: