Buf#containsNul SyncExperimental

var result = buf.containsNul();
Returns  
Number 1 if buffer contains a NUL byte

Buf#free SyncExperimental

buf.free();

Buf#grow AsyncExperimental

buf.grow(target_size).then(function(result) {
  // Use result
});
Parameters Type  
target_size Number The desired available size
Returns  
Number 0 on success, -1 on allocation failure

Buf#isBinary SyncExperimental

var result = buf.isBinary();
Returns  
Number 1 if buffer looks like non-text data

Buf#set AsyncExperimental

buf.set(data, datalen).then(function(result) {
  // Use result
});
Parameters Type  
data Buffer The data to copy into the buffer
datalen Number The length of the data to copy into the buffer
Returns  
Number 0 on success, -1 on allocation failure

Instance Variables

Variable Type Description
asize Number  
ptr String  
size Number