[Gzip Compress/Decompress] Encoding problems
Service icon
Forge component by Rui Mendes
Application Type


first of all thank you for publishing this component!

Our big goal is the implementation of the Snowflake REST API .

The data is stored in UTF-8 . The resultset is delivered in pieces ("partitions") which have to be retrieved by follow-up requests.

The first partition get's delivered uncompressed. 

I use the BinaryDataToText with the encoding parameter "UTF-8" and the result looks fine (e. g. special characters) 

 The follow-up requests delivers the data compressed (gzip) and of course also UTF-8 encoded.

As far as I can see there is no encoding parameter in the "Gzip_BinayExpand"-Action provided by you.

The result of the actions contains invalid characters, so I guess a consideration of the encoding is necessary. 

Is there a way to improve the component?

Thank you very much!

Best regards,


Interim Fix:

I have added a additional method to the extension which uses the  encoding parameter of the StreamRead constructor:

public void MssGzip_BinayExpand_UTF8(byte[] ssInBinary, out string ssOutText) {

            ssOutText = "";        


            byte[] inputBytes = ssInBinary;

            using (var inputStream = new MemoryStream(inputBytes))

            using (var gZipStream = new GZipStream(inputStream, CompressionMode.Decompress))

            using (var streamReader = new StreamReader(gZipStream,System.Text.Encoding.UTF8))


                ssOutText = streamReader.ReadToEnd();

            }// Output

        } // MssGzip_BinayExpand_UTF8

I hope the developers of this extension will find some time to implement a official encoding support :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.