question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NotSupportedException when decompress a GZIP file

See original GitHub issue

Hi ! We encountered an error with version 0.27 when we tried to decompress a GZIP file. The method MoveToNextEntry() throw a NotSupportedException exception when the code tried to access to the Length property of class SharpCompress.IO.RewindableStream.

You can reproduce this behaviour with the code bellow and the file attached: simple.gz.

FileStream fStream = new FileStream("file/simple.gz", FileMode.Open);
using (SharpCompress.Readers.IReader reader = SharpCompress.Readers.ReaderFactory.Open(fStream))
{
	while (reader.MoveToNextEntry()) // Crash here
	{ }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
adamhathcockcommented, Jan 13, 2021

0.27.1 has been released

0reactions
waldo2188commented, Jan 13, 2021

Thank you very much for the fast correction!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - decompress by gzip failed
i'm write one pair function too compress and decompress but decompress failed. this is my code public static byte[] CompressByGzip( byte[] ...
Read more >
GZipStream Class (System.IO.Compression)
This class represents the gzip data format, which uses an industry-standard algorithm for lossless file compression and decompression.
Read more >
.NET Core library to uncompress gzip file stream chunk by ...
I'm assuming the file is already gzipped and is sitting in S3. This reads a csv file and gzips it first, then reads...
Read more >
Is there a way to handle illegal file name characters on ...
Steps to reproduce on linux machine, create .tar.gz archive where one or more files have : in the name on windows 2012r2 machine...
Read more >
Prevent Zip bombs in a .NET application
In this post, I describe how to protect an application against Zip Bombs, a common way to DDOS a web site, in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found