You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the feature relevant to the Firefox PDF Viewer?
No
Feature description
Currently, a Stream object in pdf.js requires the entire stream to be loaded into memory (if I am not mistaken - the constructor requires an ArrayBuffer). This can be inefficient when working with large streams, such as flate-encoded attachments in PDFs.
I would like to ask:
Is there an existing memory-efficient way to read large (encoded) streams in pdf.js that avoids loading the entire stream into memory or to read it blockwise?
If not, would it be possible to implement a more memory-efficient mechanism?
One possible solution could be to introduce a StreamReader (or similar) abstraction that allows for more efficient handling of streams (the constructor of Stream would then, for example, look like constructor(streamReader, start, length, dict)). Possible implementations include:
ArrayBuffer-based Implementation: like the current implementation.
File-backed Implementation: A stream reader that maintains a reference to the file and reads only the required portions on demand, without loading the entire stream.
Other PDF viewers
No response
The text was updated successfully, but these errors were encountered:
Is the feature relevant to the Firefox PDF Viewer?
No
Feature description
Currently, a Stream object in pdf.js requires the entire stream to be loaded into memory (if I am not mistaken - the constructor requires an ArrayBuffer). This can be inefficient when working with large streams, such as flate-encoded attachments in PDFs.
I would like to ask:
One possible solution could be to introduce a StreamReader (or similar) abstraction that allows for more efficient handling of streams (the constructor of
Stream
would then, for example, look likeconstructor(streamReader, start, length, dict)
). Possible implementations include:Other PDF viewers
No response
The text was updated successfully, but these errors were encountered: