gz

How to download and unzip a sitemap gz file in c#?

I need to download and unzip a sitemap.xml file that is compressed (maybe tar + gzip?) into a sitemap.xml.gz From Windows I use 7zip. But note that the gz contains a directory with the same name of the zipped file (maybe due to tar + gx) How can I do in c#? Thanks ...

Generate and serving gz compressed in ASP.NET

Hi I need to serve from a ASHX a GZ compressed file. In the code I already have the string in clear: public void ProcessRequest(HttpContext context) { // this is the code without compression HttpRequest Request = context.Request; HttpResponse Response = context.Response; Response.ContentEncoding = Encoding.UTF8; Res...

get the filesize of very large .gz file on a 64bit platform

According to the specifiction of gz the filesize is saved in the last 4bytes of a .gz file. I have created 2 files with dd if=/dev/urandom of=500M bs=1024 count=500000 dd if=/dev/urandom of=5G bs=1024 count=5000000 I gziped them gzip 500M 5G I checked the last 4 bytes doing tail -c4 500M|od -I (returns 512000000 as expected)...

how do I read a huge .gz file (more than 5 gig uncompressed) in c

I have some .gz compressed files which is around 5-7gig uncompressed. These are flatfiles. I've written a program that takes a uncompressed file, and reads it line per line, which works perfectly. Now I want to be able to open the compressed files inmemory and run my little program. I've looked into zlib but I can't find a good soluti...

How can I gzinflate and save the inflated data without running it? (Found what I think is a trojan on my server)

Well, not my server. My friend found it and sent it to me, trying to make sense of it. What it appears to be is a PHP IRC bot, but I have no idea how to decode it and make any sense of it. Here is the code: <?eval(gzinflate(base64_decode('some base 64 code here')))?> So I decoded the base64, and it output a ton of strange characters, ...

How does gzcompress work?

I'm wondering about why I need to cut off the last 4 Characters, after using gzcompress(). Here is my code: header("Content-Encoding: gzip"); echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; $index = $smarty->fetch("design/templates/main.htm") ."\n<!-- Compressed by gzip -->"; $this->content_size = strlen($index); $this->content_crc = crc32($i...