Skip to content

Add seek() method to ZstdCompressionReader#287

Open
chromy wants to merge 1 commit intoindygreg:mainfrom
chromy:add-seek-method
Open

Add seek() method to ZstdCompressionReader#287
chromy wants to merge 1 commit intoindygreg:mainfrom
chromy:add-seek-method

Conversation

@chromy
Copy link

@chromy chromy commented Feb 27, 2026

Even though ZstdCompressionReader doesn't support seek()ing we should
probably follow the interface of:
https://docs.python.org/3/library/io.html#io.IOBase.seek
and define a seek method which raises OSError.

Found this in the course of investigating urllib3/urllib3#3779.
I don't know much Rust / cffi but I tried to do what looked correct from the surrounding context!

Even though ZstdCompressionReader doesn't support seek()ing we should
probably follow the interface of:
https://docs.python.org/3/library/io.html#io.IOBase.seek
and define a seek method which raises OSError.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant