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

RewindStream fails for compressed files #999

Closed
fingolfin opened this issue Dec 7, 2016 · 4 comments
Closed

RewindStream fails for compressed files #999

fingolfin opened this issue Dec 7, 2016 · 4 comments
Labels
kind: bug Issues describing general bugs, and PRs fixing them

Comments

@fingolfin
Copy link
Member

GAP supports reading from gzip compressed files transparently. I.e. GAP code need not be aware of this, it just happens "automatically".

However, RewindStream does not work in that case -- not surprising, given that we implement this by piping the data through a separate gunzip process.

One way to fix this would be to implement native gzip decompression (see issue #916). But of course it is probably much easier to fix just this special case. To do that, we probably would have to modify SEEK_POSITION_FILE or SyFseek in the kernel somehow.

By the way, this issue results in GAP not support gzip compressed manual.six files, which is why Debian includes a workaround fix which replaces a RewindStream call in the help system by code which closes the file and reopens it. See also this issue on our old private tracker: http://tracker.gap-system.org/issues/466

@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Dec 7, 2016
@ChrisJefferson
Copy link
Contributor

At the moment we don't store the filename a stream is based on, but we could certainly store that, and then try to reopen the file later.

@fingolfin
Copy link
Member Author

@ChrisJefferson I wonder if this is now fixed with the use of zlib?

@ChrisJefferson
Copy link
Contributor

It is, works fine in master!

@fingolfin
Copy link
Member Author

Great, so this was resolved by PR #2509 -- and that even adds a check for seeking, in commit 40d3c87. So we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Issues describing general bugs, and PRs fixing them
Projects
None yet
Development

No branches or pull requests

2 participants