Node.Buffer 
- Package
 - purescript-node-buffer
 - Repository
 - purescript-node/purescript-node-buffer
 
Mutable buffers and associated operations.
Re-exports from Node.Buffer.Class  
#MutableBuffer Source
class MutableBuffer :: Type -> (Type -> Type) -> Constraintclass (Monad m) <= MutableBuffer buf m | buf -> m where
A type class for mutable buffers buf where operations on those buffers are
represented by a particular monadic effect type m.
Members
create :: Int -> m buffreeze :: buf -> m ImmutableBufferCreates an immutable copy of a mutable buffer.
unsafeFreeze :: buf -> m ImmutableBufferO(1). Convert a mutable buffer to an immutable buffer, without copying. The mutable buffer must not be mutated afterwards.
thaw :: ImmutableBuffer -> m bufCreates a mutable copy of an immutable buffer.
unsafeThaw :: ImmutableBuffer -> m bufO(1) Convert an immutable buffer to a mutable buffer, without copying. The input buffer must not be used afterward.
fromArray :: Array Octet -> m bufCreates a new buffer from an array of octets, sized to match the array.
fromString :: String -> Encoding -> m bufCreates a new buffer from a string with the specified encoding, sized to match the string.
fromArrayBuffer :: ArrayBuffer -> m bufCreates a buffer view from a JS ArrayByffer without copying data.
toArrayBuffer :: buf -> m ArrayBufferCopies the data in the buffer to a new JS ArrayBuffer
read :: BufferValueType -> Offset -> buf -> m NumberReads a numeric value from a buffer at the specified offset.
readString :: Encoding -> Offset -> Offset -> buf -> m StringReads a section of a buffer as a string with the specified encoding.
toString :: Encoding -> buf -> m StringReads the buffer as a string with the specified encoding.
write :: BufferValueType -> Number -> Offset -> buf -> m UnitWrites a numeric value to a buffer at the specified offset.
writeString :: Encoding -> Offset -> Int -> String -> buf -> m IntWrites octets from a string to a buffer at the specified offset. Multi-byte characters will not be written to the buffer if there is not enough capacity to write them fully. The number of bytes written is returned.
toArray :: buf -> m (Array Octet)Creates an array of octets from a buffer's contents.
getAtOffset :: Offset -> buf -> m (Maybe Octet)Reads an octet from a buffer at the specified offset.
setAtOffset :: Octet -> Offset -> buf -> m UnitWrites an octet in the buffer at the specified offset.
slice :: Offset -> Offset -> buf -> bufCreates a new buffer slice that acts like a window on the original buffer. Writing to the slice buffer updates the original buffer and vice-versa.
size :: buf -> m IntReturns the size of a buffer.
concat :: Array buf -> m bufConcatenates a list of buffers.
concat' :: Array buf -> Int -> m bufConcatenates a list of buffers, combining them into a new buffer of the specified length.
copy :: Offset -> Offset -> buf -> Offset -> buf -> m IntCopies a section of a source buffer into a target buffer at the specified offset, and returns the number of octets copied.
fill :: Octet -> Offset -> Offset -> buf -> m UnitFills a range in a buffer with the specified octet.
Creates a new buffer of the specified size.