Skip to content

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

@Mohammed-Swillam

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

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