-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
None
-
None
Deflater and Inflater are hard to use correctly, resulting in wrapping code in external libraries and frequent misuse/bugs.
What is needed in most cases is a simple pair of static compress/uncompress methods.
byte[] Deflater.deflate(byte[] uncompressedData)
byte[] Inflater.inflate(byte[] compressedData)
I believe it would be worthwhile adding one override:
byte[] Deflater.deflate(byte[] uncompressedData, int compressionLevel)
Providing these methods would probably deal with 80%+ of end user usages of these classes.
What is needed in most cases is a simple pair of static compress/uncompress methods.
byte[] Deflater.deflate(byte[] uncompressedData)
byte[] Inflater.inflate(byte[] compressedData)
I believe it would be worthwhile adding one override:
byte[] Deflater.deflate(byte[] uncompressedData, int compressionLevel)
Providing these methods would probably deal with 80%+ of end user usages of these classes.
- relates to
-
JDK-8026127 Deflater/Inflater documentation incomplete/misleading
- Resolved