Skip to content

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 U…

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’…

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: C…

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 …