Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to handle the protocol VarInt type http://dev.nuls.io/protocol/index.html#VarInt

Hierarchy

  • VarIntSerializer

Index

Methods

Methods

Static read

Static size

  • size(data: number): number

Static write

  • write(data: number, buf: Buffer, offset: number): number
  • Writes data to buf at the specified offset

    Parameters

    • data: number

      Number to be written to buf

    • buf: Buffer

      Buffer object where the number will be written

    • offset: number

      Number of bytes to skip before starting to write.

    Returns number

    Offset plus the number of bytes that has been written