stream_gzip icon indicating copy to clipboard operation
stream_gzip copied to clipboard

Another way of gunzipping File streams

Open sebsel opened this issue 6 years ago • 0 comments

Hi! Thanks for your package!

I have been playing around with it for a few hours now, and there seems to be some bug (at least in my test-file of 1MB (9,5MB unzipped), where somewhere a few MBs in, things start to break down. It's XML, and it starts out right, but halfway it blows up with weird characters. I can't share the file due to copyright unfortunately :(

But, I found this, and it solved my problem, so I thought it would be nice to let you know:

File.stream!(filename, [:compressed])
|> Enum.into("")

See docs for more modes: https://hexdocs.pm/elixir/File.html#open/2

sebsel avatar Nov 26 '18 20:11 sebsel