Bug Dose Report
https://github.com/OHIF/Viewers/issues/2701
This isn't a reliable use of .buffer on line 224. It will return the underlying ArrayBuffer, but you also need to respect the byte offset and byte length values which specify the part of that ArrayBuffer that actually contains the relevant data. The underlying ArrayBuffer may be larger, and may be shared amongst different Uint8Array instances.
You can slice the buffer but that does create a copy. Looking at the code for readFile() I don't see any obvious alternative though.
My take is that really the caller should be able to pass a Node.js buffer directly here (when running on Node.js), or alternatively be able to pass byteOffset and byteLength values to DicomMessage.readFile() which it then sets on the ReadBufferStream it creates. This would avoid the need for buffer copying.
Fortunately, larger files tend not to have this issue because they never use the Node.js buffer pool due to their size, which means the ArrayBuffer returned by .buffer is in fact safe to pass directly to DicomMessage.readFile().
How big is your DICOM file?