Buffer fill method and filling buffers completely in nodejs
Todays post will be a few quick examples on the buffer fill method in the nodejs buffer global. The buffer fill method can be used to fill a buffer with a data pattern, so it similar to buffer write but is not a replacement for it, in fact that method is a more robust alternative to buffer fill. The buffer fill method is just a convenience method for something that can be done with buffer write that can be used to write to a buffer in general, rather than just filling a buffer with a pattern.
So then the buffer write method might be more appropriate when it comes to just writing data to a certain location and length to a buffer instance. As such this post will be mostly on the buffer fill method, but also on filling a buffer with data in general, with buffer write, and also the ways that buffers are created to begin with.