TranscodingStreams.jl icon indicating copy to clipboard operation
TranscodingStreams.jl copied to clipboard

Deprecate generic `seekend` method

Open nhz2 opened this issue 1 year ago • 0 comments

As noted by @jakobnissen in https://github.com/JuliaIO/TranscodingStreams.jl/pull/149#discussion_r1358720410 and @Marlin-Na in #109 there is no way to implement a generic seekend method that doesn't process the whole file.

This is because after calling seekend on a decompressing stream, position should return the uncompressed data size.

I propose deprecating the generic seekend method and removing it in the next breaking release.

Another option would be to implement a generic seek and seekend using the generic seekstart and skip, but as noted in https://github.com/JuliaIO/TranscodingStreams.jl/pull/149#discussion_r1358720410 this could be surprising as seek is expected to be reasonably fast.

nhz2 avatar Mar 19 '24 18:03 nhz2