Function toBuffer

  • Read a pointer as a Buffer

    If byteLength is not provided, the pointer is assumed to be 0-terminated.

    Parameters

    • ptr: number

      The memory address to read

    • Optional byteOffset: number

      bytes to skip before reading

    • Optional byteLength: number

      bytes to read

      While there are some checks to catch invalid pointers, this is a difficult thing to do safely. Passing an invalid pointer can crash the program and reading beyond the bounds of the pointer will crash the program or cause undefined behavior. Use with care!

    Returns "buffer".Buffer

  • Read a pointer as a Buffer

    If byteLength is not provided, the pointer is assumed to be 0-terminated.

    Parameters

    • ptr: number

      The memory address to read

    • Optional byteOffset: number

      bytes to skip before reading

    • Optional byteLength: number

      bytes to read

      While there are some checks to catch invalid pointers, this is a difficult thing to do safely. Passing an invalid pointer can crash the program and reading beyond the bounds of the pointer will crash the program or cause undefined behavior. Use with care!

    Returns "buffer".Buffer

Generated using TypeDoc