Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible seek function of the s2.ReadSeeker if 'whence' is using 'io.SeekEnd' #574

Closed
jlnieh opened this issue Apr 29, 2022 · 1 comment · Fixed by #575
Closed

Incompatible seek function of the s2.ReadSeeker if 'whence' is using 'io.SeekEnd' #574

jlnieh opened this issue Apr 29, 2022 · 1 comment · Fixed by #575

Comments

@jlnieh
Copy link

jlnieh commented Apr 29, 2022

Incompatible behavior to use the Seek function of the s2.ReadSeeker with s2 Index when using whence=io.SeekEnd

  • Version: v1.15.2
  • Issue description:
    • filesize, err = rs.Seek(0, io.SeekEnd), expect to get the uncompressed file size, but currently return 0
    • pos, err = rs.Seek(-10, io.SeekEnd), expect to get position at last 10-bytes from end of uncompressed file, but currently return 10
klauspost added a commit that referenced this issue Apr 29, 2022
Offset sign was flipped

Fixes #574
@klauspost
Copy link
Owner

Thanks for the report! Added a fix I will merge shortly.

klauspost added a commit that referenced this issue Apr 29, 2022
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 a pull request may close this issue.

2 participants