Deflater/Inflater simple usage methods

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: core-libs
    • 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.

            Assignee:
            Xueming Shen
            Reporter:
            Stephen Colebourne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: