Skip to content
Advertisement

Tag: gzip

Kotlin gzip uncompress fail

I try to simplify my java gzip uncompress code to kotlin. But after I changed, it sames broken. Here is the java code This is my kotlin code. And I got this error. It seems that the decompression process was interrupted by reader? Answer The readText(charset: Charset = Charsets.UTF_8) decodes the bytes into UTF-8 character set, which is why it

Why is the GZIP “os” header hard-coded to FAT in Java?

RFC 1952 section 2.3.1 specifies that GZIP headers must contain an OS flag: OS (Operating System). This identifies the type of file system on which compression took place. This may be useful in determining end-of-line convention for text files. The currently defined values are as follows: However, Java’s GZIP serialisation instead writes a zero in all cases, as can be

How to download GZip file from S3?

I have looked at both AWS S3 Java SDK – Download file help and Working with Zip and GZip files in Java. While they provide ways to download and deal with files from S3 and GZipped files respectively, these do not help in dealing with a GZipped file located in S3. How would I do this? Currently I have: Clearly,

How to I find out the size of a GZIP section embedded in firmware?

I am currently analyzing firmware images which contain many different sections, one of which is a GZIP section. I am able to know the location of the start of the GZIP section using magic number and the GZIPInputStream in Java. However, I need to know the compressed size of the gzip section. GZIPInputStream would return me the uncompressed file size.

Working with Zip and GZip files in Java

It’s been a while since I’ve done Java I/O, and I’m not aware of the latest “right” ways to work with Zip and GZip files. I don’t necessarily need a full working demo – I’m primarily looking for the right interfaces and methods to be using. Yes, I could look up any random tutorial on this, but performance is an

Advertisement