gzipstream Questions

4

Is there a way to know if the byte[] has been compressed (or not) by GzipStream .net class? EDIT: Just want to know if the byte[] array has been compressed (since I will always be using GzipStrea...
Ordinance asked 11/1, 2011 at 21:23

2

Solved

I am using the C# GZipStream class to compress some input data. The problem is when that input is empty. In that scenario, it ends up creating a 0 byte file. When I try to use 7zip to unzip the res...
Izard asked 3/6, 2014 at 21:4

5

Solved

I have a big object in memory which I want to save as a blob into database. I want to compress it before saving because database server is usually not local. This is what I have at the moment: us...
Tannen asked 23/8, 2012 at 9:27

3

Solved

The goal is to: Create a file read stream. Pipe it to gzip (zlib.createGzip()) Then pipe the read stream of zlib output to: 1) HTTP response object 2) and writable file stream to save the gzipp...
Overhear asked 5/1, 2013 at 15:55

2

Solved

My application serializes an object using Json.Net, compresses the resulting JSON, then saves this to file. Additionally the application can load an object from one of these files. These objects ca...
Goose asked 5/10, 2015 at 8:8

2

Solved

I have code that should do the compression: FileStream fs = new FileStream("g:\\gj.txt", FileMode.Open); FileStream fd = new FileStream("g:\\gj.zip", FileMode.Create); GZipStream csStream = new GZ...
Geter asked 17/10, 2009 at 7:58

2

Solved

Does anyone know why I'm getting the "Unexpected end of data" error message when un-gzipping the gzip file? To verify the bytes data is not corrupted, I use the FooTest4.csv to write to file and w...
Sicanian asked 11/8, 2016 at 17:27

4

Solved

I've got a file created with code which looks like this: using (var fs=File.OpenWrite("tmp")) { using (GZipStream gs=new GZipStream(fs,CompressionMode.Compress,true)) { using (StreamWriter sw...
Christiansen asked 7/3, 2013 at 18:28

2

Solved

I'm attempting to use National Weather Service (U.S.) data, but something has changed recently and the GZip file no longer opens. .NET 4.5 complains that... Message=The magic number in GZip heade...
Their asked 5/5, 2015 at 21:2

2

Solved

I want to compress my web application with Gzip and I am using following class compression filter public class CompressFilter : ActionFilterAttribute { public override void OnActionExecuting(Act...
Derosier asked 21/7, 2015 at 1:50

1

Solved

If compress some json text, and write that it to a file using a FileStream I get the expected results. However, I do not want to write to disk. I simply want to memorystream of the compressed data....
Ignorance asked 13/1, 2016 at 19:43

3

Solved

I'm trying to serialize and compress a WPF FlowDocument, and then do the reverse - decompress the byte array and deserialize to recreate the FlowDocument - using the .NET GZipStream class. I'm foll...
Plug asked 11/8, 2012 at 14:41

1

I have a gzip file containing a txt file that needs to be cleaned up. I would like to read from the GZipped file line by line and then write the cleaned content to an output GZIP file all in one sh...
Synagogue asked 18/9, 2014 at 17:22

4

Solved

Our software is decompressing certain byte data through a GZipStream, which reads data from a MemoryStream. These data are decompressed in blocks of 4KB and written into another MemoryStream. We'v...
Inflexible asked 8/7, 2014 at 15:48

2

Solved

I've got a pesky problem with gzipstream targeting .Net 3.5. This is my first time working with gzipstream, however I have modeled after a number of tutorials including here and I'm still stuck. M...
Helotry asked 1/7, 2014 at 14:24

5

Solved

If I GZip this text: Hello World through C# using this code: Stream stream = new MemoryStream(Encoding.Default.GetBytes("Hello World")); var compressedMemoryStream = new MemoryStream();...
Aprylapse asked 11/7, 2012 at 14:43

1

Solved

In my project I need to upload large JSON data from a desktop app. So, I need it to be compressed. I searched everywhere but I did not find a complex solution to my problem. So, I put several snip...
Nolitta asked 12/6, 2014 at 9:16

2

Solved

I am attempting to compress a large amount of data, sometimes in the region of 100GB, when i run the routine i have written it appears the file comes out exactly the same size as the previous size....
Bossuet asked 16/5, 2012 at 15:29

5

I have a large amount of data (~100k) that my C# app is sending to my Apache server with mod_gzip installed. I'm attempting to gzip the data first using System.IO.Compression.GZipStream. PHP receiv...
Ides asked 26/7, 2009 at 3:57

1

Solved

I'm trying to read in a file and compress it using GZipStream, like this: using (var outStream = new MemoryStream()) { using (var fileStream = new FileStream(filename, FileMode.Open, FileAccess.R...
Stylographic asked 6/12, 2013 at 12:6

4

Solved

I have some code that downloads gzipped files, and decompresses them. The problem is, I can't get it to decompress the whole file, it only reads the first 4096 bytes and then about 500 more. Byte[...
America asked 18/6, 2010 at 9:6

8

Solved

I plan to configure weblogic's gzip servlet filter (using weblogicx-gzip.jar) to gzip my web pages. How can I verify that the pages are being sent to the client gzipped?
Photogravure asked 11/3, 2010 at 20:47

5

Solved

I want to compress and decompress a folder using C#. The problem with GZipStream is that it takes filenames and hence I need to write a recursive logic. Can I somehow do it like, give source fold...
Herbertherbicide asked 20/1, 2011 at 14:37

3

Solved

I am simply looking for a way to compress multiple files in a GZip file with the GZipStream class. Anybody has an idea how to do that?
Aretina asked 7/11, 2010 at 16:41

4

I have a .NET 2.0 WinForms app that connects to a backend WAS server. I am using GZipStream to decode data coming back from a HttpWebRequest call made to the server. The data returned is compressed...
Crispi asked 5/10, 2009 at 19:51

© 2022 - 2024 — McMap. All rights reserved.