Questions tagged [gzip]

GZip/gzip is both the name for a compressed data format and any of several software applications implementing this format. Use this tag for questions about implementing the library on your program.

gzip is the name for the compressed data format used by the eponymous GZip application for compressing and decompressing data.

The format is based on the deflate compressed data format, with the addition of a file metadata header and a CRC32 checksum. It is defined in RFC 1952. It is commonly used to compress HTTP requests and responses, and also often combined with the tar format for archival.

The most known standalone command-line implementation is GNU zip. The format is also implemented by the zlib library, and in this form used in many applications.

GZip on Wikipedia

6057 questions
3
votes
3 answers

Fastest way to GZIP and UDP a large amount of Strings in Java

I'm implementing a logging system that needs to encode the log messages with GZIP and send them off by UDP. What I've got so far is: Initialization: DatagramSocket sock = new DatagramSocket(); baos = new ByteArrayOutputStream(); printStream = new…
Kristaps Baumanis
  • 563
  • 1
  • 7
  • 18
3
votes
0 answers

Django + s3 gzip images on upload

I can successfully use django-storages to gzip images when collecting static files, but when users upload images using a form, the images remain uncompressed. Is there a way to compress those images in django?
3
votes
1 answer

Can a response to an http request error be gziped?

When trying to execute an http request that causes a 400 Bad Request error, an nginx server returns the "400 Bad Request", a Content-Encoding: gzip, and the response in a non-encoded format. So because of the Content-Encoding: gzip my code wraps the…
isapir
  • 21,295
  • 13
  • 115
  • 116
3
votes
1 answer

Downloading compressed content over HTTP using Python

How do I take advantage of HTTP 1.1's compression when downloading web pages using Python? I am currently using the built-in urllib module for downloading web content. Reading through the documentation I couldn't find any information that is indeed…
Philip Fourie
  • 111,587
  • 10
  • 63
  • 83
3
votes
2 answers

My returned data is not gzipped with connect.compress()

I am trying to use the connect.compress() middleware to gzip my responses to the client. I am able to partially get it to work but when I add my own response using res.end the response is no longer gzipped. Gzipped responses: app = connect() …
3
votes
3 answers

How to use Java DeflaterOutputStream

Edit: I really just need to know when a Deflater derived class decides to write header and footer data, and how to exploit those facts. I would really like to do the following: Prime the dictionary for a Deflater derived class with some bytes (I…
jsjwooowooo
  • 147
  • 1
  • 2
  • 9
3
votes
1 answer

Hadoop: How to output different format types in the same job?

I want to output gzip and lzo formats at the same time in one job. I used MultipleOutputs, and add two named outputs like this: MultipleOutputs.addNamedOutput(job, "LzoOutput", GBKTextOutputFormat.class, Text.class,…
thomaslee
  • 407
  • 1
  • 7
  • 21
3
votes
3 answers

TrueZip Random Access Functionality

I'm trying to understand how to randomly traverse a file/files in a .tar.gz using TrueZIP in a Java 6 environment( using the Files classes). I found instances where it uses Java 7's Path, however, I can't come up with an example on how to randomly…
stan
  • 4,885
  • 5
  • 49
  • 72
3
votes
1 answer

Enable gzip compression using MVC3

I am using the chrome extension YSlow to test my site performance. I've got F Grade on Compress components with gzip. There are 15 plain text components that should be sent…
Aviran Cohen
  • 5,581
  • 4
  • 48
  • 75
3
votes
0 answers

HTTP Response GZip Compression

I have a Proxy which handles HTTP Requests. Now when I get a GZipped HTTP Response, I'm decompressing it like : MemoryStream ms = new MemoryStream(); if (response.ContentLength > 0) buffer = new Byte[response.ContentLength]; else buffer = new…
RaphaelH
  • 2,144
  • 2
  • 30
  • 43
3
votes
1 answer

Download Gzip XML File in Php

I have an xml file around 30 MB, which is distributed to client as Gzip Xml File through URL, but the problem is that as a Client, I can't save a copy of it into the client's server, as xml file. When I try with SimpleXMLElement, it says that I have…
Erman Belegu
  • 4,074
  • 25
  • 39
3
votes
0 answers

IE8 not sending Accept-Encoding: gzip, deflate

Following on closely from this question SSRS IE8 JavaScript Error Invalid Character ScriptResource.axd I have done some debugging and narrowed the issue down to a gzip, deflate problem. We have various machines with IE8 installed on them. The…
general exception
  • 4,202
  • 9
  • 54
  • 82
3
votes
1 answer

PHP GZip and Server Sent Event Streams

I'm writing a server sent event stream in PHP and I receive the error: "failed to flush buffer zlib output compression" This I believe is due to trying to flush the gzipped output. Here's my PHP code: header ("Content-Type:…
benedict_w
  • 3,543
  • 1
  • 32
  • 49
3
votes
2 answers

How to extract zipped file received from HttpWebResponse?

I put url to browser's address bar and it downloads the zip file to HD. The size of zipped file is 386 bytes as written in its properties. When I use UnZipFiles method to extract the file - it works. But, I want to download programaticaly and…
theateist
  • 13,879
  • 17
  • 69
  • 109
3
votes
1 answer

Reading and writing objects via GZIP streams?

I am new to Java. I want to learn to use GZIPstreams. I already have tried this: ArrayListmyObject = new ArrayList(); // SubImage is a Serializable class ObjectOutputStream compressedOutput = new ObjectOutputStream( new…
Jisan Mahmud
  • 201
  • 1
  • 4
  • 11
1 2 3
99
100