API Docs for: 0.0.57
Show:

EncodeDecode Class

Methods

decodeArray

(
  • stream
  • decode_element_func
)
Array

Parameters:

  • stream BinaryStream

    the stream.

  • decode_element_func Function

    The function to decode a single array element. This function returns the element decoded from the stream

Returns:

Array:

encodeArray

(
  • arr
  • stream
  • encode_element_func
)

Parameters:

  • arr Array

    the array to encode.

  • stream BinaryStream

    the stream.

  • encode_element_func Function

    The function to encode a single array element.

getRandomInt

(
  • min
  • max
)
private

return a random integer value in the range of min inclusive and max exclusive

Parameters:

  • min Object
  • max Object

Returns:

:

getRandomInt

(
  • min
  • max
)
private

return a random float value in the range of min inclusive and max exclusive

Parameters:

  • min Object
  • max Object

Returns:

: