Example
Example
Buffer
Buffer
Uint8Array
Bytes returns the byte representation of the buffer.
Uint8Array
Example
string
Hex returns the hex representation of the buffer.
string
Example
string
Hexdump returns the hexdump representation of the buffer.
string
Example
number
Len returns the length of the buffer.
number
Example
formatStr
, msg
): void
Pack uses structs.Pack and packs given data and appends it to the buffer.
it packs the data according to the given format.
Name | Type |
---|---|
formatStr | string |
msg | any |
void
Example
string
String returns the string representation of the buffer.
string
Example
data
): Buffer
Write appends the given data to the buffer.
Name | Type |
---|---|
data | Uint8Array |
Buffer
Example
data
): Buffer
WriteString appends the given string data to the buffer.
Name | Type |
---|---|
data | string |
Buffer
Example