I receive files as byte buffers and cannot use the fs.stat () method. Therefore, I am trying to use buf.length, but this length refers to the amount of memory allocated for the buffer object, and not the actual size of the content. For example, I have a file of size 22,449 bytes. buf.length returns 39804 for it.
lor1an
source share