Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9204755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:47:06+00:00 2026-06-17T23:47:06+00:00

I have a project where i used gzip in .cs file to zip the

  • 0

I have a project where i used gzip in .cs file to zip the data.
Here is my code.

public byte[] CustomerList()
{
    SqlDataAdapter da = new SqlDataAdapter("select CustomerID from CustomerMaster", con);

    DataSet ds = new DataSet();
    da.Fill(ds);
    return CompressData(ds);
}
public byte[] CompressData(DataSet ds)
{
    using (MemoryStream memory = new MemoryStream())
    {
        using (GZipStream gzip = new GZipStream(memory, CompressionMode.Compress))
        {
            var formatter = new BinaryFormatter();
            formatter.Serialize(gzip, ds);
            gzip.Close();
        }

        return memory.ToArray();
    }
}

I called this zip function form my js file and getting the data as a byte format.

<script type="text/javascript" language="javascript">
$(document).ready(function () {

                $.ajax({
                    type: "POST",
                    url: "Service1.svc/CustomerList",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    processdata: true,
                    success: function (data) {
                        alert(data.CustomerListResult);
                    },
                    error: function () {
                        alert("Error");
                    }
                });
            });

Now i want to decrypt this [byte-data] to get the original string. Here the issue started. How should i get the original data that means how i would decrypt or unzip the [byte data] to get the original string.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:47:07+00:00Added an answer on June 17, 2026 at 11:47 pm

    There is simillar your question.
    JavaScript implementation of Gzip
    and
    JavaScript: Decompress / inflate /unzip /ungzip strings

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a sub-project 'commonUtils' that has many generic code-snippets used across the parent
Suppose I have a project MyFramework that has some code, which is used across
note I am new in Wpf > I have project that decode qr code
We have a project that generates a code snippet that can be used on
I have a web project that used to use Forms Authentication. I have new
I have a VS project used for my .NET WCF host with some simple
I have a Biztalk 2006 R2 project (used with ESB Guidance 1) I am
I have a problem regarding the ksoap2. My problem is that the project used
I have a project in which I used maven fail-safe plugin to run the
i need to access folder in project .I have used Directory.CurrentDirectory and it is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.