Package 

Class GZIPUtils


  • 
    public class GZIPUtils
    
                        

    A collection of utility methods for working on GZIPed data.

    • Method Summary

      Modifier and Type Method Description
      final static Array<byte> unzipBestEffort(Array<byte> in) Returns an gunzipped copy of the input array.
      final static Array<byte> unzipBestEffort(Array<byte> in, int sizeLimit) Returns an gunzipped copy of the input array, truncated tosizeLimit bytes, if necessary.
      final static Array<byte> unzip(Array<byte> in) Returns an gunzipped copy of the input array.
      final static Array<byte> zip(Array<byte> in) Returns an gzipped copy of the input array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • unzipBestEffort

         final static Array<byte> unzipBestEffort(Array<byte> in)

        Returns an gunzipped copy of the input array. If the gzipped input has beentruncated or corrupted, a best-effort attempt is made to unzip as much aspossible. If no data can be extracted null is returned.

        Parameters:
        in - an array of objects.
      • unzipBestEffort

         final static Array<byte> unzipBestEffort(Array<byte> in, int sizeLimit)

        Returns an gunzipped copy of the input array, truncated tosizeLimit bytes, if necessary. If the gzipped input has beentruncated or corrupted, a best-effort attempt is made to unzip as much aspossible. If no data can be extracted null is returned.

        Parameters:
        in - an array of objects.
        sizeLimit - a int.
      • unzip

         final static Array<byte> unzip(Array<byte> in)

        Returns an gunzipped copy of the input array.

        Parameters:
        in - an array of objects.
      • zip

         final static Array<byte> zip(Array<byte> in)

        Returns an gzipped copy of the input array.

        Parameters:
        in - an array of objects.