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 it feasible to implement #seek on InputStream? This would make it possible to use with PDF::Reader, which checks for a duck that quacks #read and #seek.
The text was updated successfully, but these errors were encountered:
I don't want to categorically say it's not feasible, but it's definitely non-trivial.
Presumably you want to seek from the perspective of the uncompressed data? There's no #seek on the underlying compressed stream provided by zlib, you can only read from the start. I think we could do it with an internal buffer, but we'd need to be very careful with very large zip entries filling up available memory. And seeking backwards would mean starting over and reading forwards again...
I'll have a think about it - you've piqued my interest - but I can't promise anything on any timeline, sorry.
Is it feasible to implement
#seek
onInputStream
? This would make it possible to use withPDF::Reader
, which checks for a duck that quacks#read
and#seek
.The text was updated successfully, but these errors were encountered: