Questions tagged [gzipinputstream]

GzipInputStream is a Java class for reading data that are compressed in gzip format. It is also available on Android.

GzipInputStream is a Java class for reading data that are compressed in gzip format. It is also available on Android.

On .NET, there is a similar class called GZipStream: use

125 questions
1
vote
0 answers

Sending files over a RESTful webservice: Base64 encoding and GZip compression

Since a few days I am fiddling with Java a project to send/receive files with a RESTful webservice. I do this with as little extra libraries as possible because this will be an extension to an existing software system. To make my project run within…
Vertongen
  • 185
  • 3
  • 14
1
vote
1 answer

Reading gzip content info

Decompressing gz file in c# has been asked and answered all over Internet, but thats not exactly what I'm looking for. I need a library that would give me: 1) the name of the file inside the gz file. 2) its modified time as it was in it originally…
user734028
  • 1,021
  • 1
  • 9
  • 21
1
vote
1 answer

NIO GZIP compression and copying of files

I was using FileChannel and FileInputStream to do a simple file copying from File fromFile to File toFile. The code is basically like this: source = new FileInputStream(fromFile).getChannel(); destination = new FileOutputStream(toFile,…
bozeng
  • 245
  • 1
  • 2
  • 10
1
vote
1 answer

Why GZIPInputStream takes quite long time?

System.out.println("Input String length : " + str.length()); System.out.println("SWB==="+sw.getTime()); byte[] bytes = Base64.decodeBase64(str); System.out.println("SWB==="+sw.getTime()); GZIPInputStream gis = new GZIPInputStream(new…
dinesh707
  • 12,106
  • 22
  • 84
  • 134
1
vote
1 answer

GZIP compression and decompression

I am using following code to compress and then decompress the string. But I am getting a different length of string after decompression, also few characters are missing from the decompressed string. Compression: ByteArrayOutputStream…
Arry
  • 1,630
  • 9
  • 27
  • 46
1
vote
1 answer

Gzip a string in Zlib using C/C++

I would like to use gzip from C++ (or C) to gzip a string. If possible, I would like to use zlib. When I learned that I would have to use zlib to compress and uncompress, I Googled it for a few minutes and then quickly wrote a program to gzip a file…
Uday
  • 43
  • 1
  • 4
1
vote
1 answer

reading gzipped request in servlet

i'm missing something in a pretty easy task: i have to check if incoming request inputstream is gzipped and ungzip its content. this without using content-type. i thought about something like this: check if request is gzipped: private boolean…
atarno
  • 329
  • 1
  • 3
  • 14
1
vote
0 answers

App Engine: URL Fetching and decompressing a large Gzipped XML file in Java

I'm trying to retrieve a gzipped XML file from a URL. My problem is, when decompressing it using GZipInputStream in production, the content I get seems to be truncated. I can only read up to a relatively small part of the xml. URL feedURL = new…
Rafael
  • 11
  • 3
1
vote
1 answer

GZipInputStream .read() insert zeros into buffer

I am having a strange program with a GzipInputStream zero filling part of the buffer. I have the fortune of knowing what the bytes are supposed to look like in the stream and I can see the buffer is being filled with 8 correct bytes and 12 zeros…
Submerged
  • 646
  • 1
  • 10
  • 16
1
vote
3 answers

PHP's gzuncompress function in Java?

I'm compressing a string using PHP's gzcompress() function: http://us2.php.net/manual/en/function.gzcompress.php I'd like to take the output from the PHP compression function and decompress the string in Java. Can anyone send me down the right…
Kirk Ouimet
  • 27,280
  • 43
  • 127
  • 177
1
vote
0 answers

Is there leak issue of Android's GZIPInputStream

I found that for some case (GZIPInputStream throw IOException), there is a leak - Inflater member of GZIPInputStream which is constructed in first statement is not released correctly via function "end()". In this case, GZIPInputStream is not…
user941884
  • 21
  • 5
0
votes
1 answer

byte array gzip and base64 encoding results in OOM error upon retrieval and decode+unzip at high load

We have an XML document of size 1.4MB which we gzipCompress and encode to Base64 and save in cosmos. Upon receiving some updates, we read cosmos, decode from base64 and unzip to get the original string. What we are observing is at some high load the…
0
votes
1 answer

Failing GZIPInputStream

My Java app writes out a gzip compressed object to a file using try-with resources statement. The object is a very basic with a couple of primitive fields and an ArrayList of Integers. It has no Strings or more complex objects within. On some…
Obsyd
  • 3
  • 1
0
votes
0 answers

Android DeCompress String giving java.util.zip.ZipException: Not in GZIP format

I am compressing my large string with below approach and i am geeting "java.util.zip.ZipException: Not in GZIP format" exception while decompress my string. please help me out. @kotlin.Throws(IOException::class) fun compress(data: String):…
0
votes
2 answers

Not in GZIP format java while reading the zip dynamically

my requirement is to unzip a log file dynamically and write it in the console. But I am getting an exception java.util.zip.ZipException: Not in GZIP format at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:166) ~[?:?] at…
Watermelon
  • 84
  • 8
1 2 3
8 9