julianhille / MuhammaraJS

Muhammara a node module with c/cpp bindings to modify PDF with js for node or electron (based/replacement on/of galkhana/hummusjs)
Other
205 stars 43 forks source link

Update `PDFRStreamForBuffer` to read buffer without copying all at once #335

Closed ericbf closed 8 months ago

ericbf commented 8 months ago

When using PDFRStreamForBuffer for using buffers that were relatively large (but not really that large), a range error would be thrown. This commit makes it so PDFRStreamForBuffer does not create an array from the entire buffer at once, but only creates array for each slice being read.

Fixes #334