Skip to content

InvalidDataException: The magic number in GZip header is not correct. Make sure you are passing in a GZip stream. #3

Description

@Mohammed-Swillam

When using the Async code provided, it fails with the following exception thrown:

InvalidDataException:
The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.

The exact line which throws the exception is marked with a (=>) sign below:
'
GZipStream gzip = new GZipStream(memory, CompressionMode.Decompress,false);
=> int uncompressedLength = gzip.Read(uncompressedBuffer, 0, uncompressedBuffer.Length);
output.AddRange(uncompressedBuffer.Take(uncompressedLength));
'
I'm currently investigating the problem and trying to figure out a fix, if you have a solution kindly let us know,

Thank you,
Mohammed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions