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

Add do-syntax for transcoding streams #97

Open
jakobnissen opened this issue Mar 26, 2020 · 1 comment
Open

Add do-syntax for transcoding streams #97

jakobnissen opened this issue Mar 26, 2020 · 1 comment

Comments

@jakobnissen
Copy link
Collaborator

It would be nice if there was a constructor TranscodingStream{C,S}(predicate ...) which allows for the do-syntax, like such:

matrix = GzipDecompressorStream(open(path))
    # stuff
    return matrix
end

We have that for most Julia IO as far as I know.

@lassepe
Copy link

lassepe commented Apr 26, 2021

You can already do

open(GzipDecompressorStream, path, "r") do io
    # stuff
    return matrix
end

Or is this not what you intend to do with the proposed syntax?

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

No branches or pull requests

2 participants