Class ZipEngine

  • Direct Known Subclasses:
    W.Z

    public class ZipEngine
    extends java.lang.Object
    压缩引擎
    Author:
    WD
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Zip GZIP
      gzip压缩器
      static Zip ZIP
      zip压缩器
      static Zip ZLIB
      Zlib压缩器
    • Constructor Summary

      Constructors 
      Constructor Description
      ZipEngine()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] compress​(java.lang.Object obj)
      压缩数据
      static byte[] extract​(java.lang.Object obj)
      解压数据
      • Methods inherited from class java.lang.Object

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

      • ZLIB

        public static final Zip ZLIB
        Zlib压缩器
      • GZIP

        public static final Zip GZIP
        gzip压缩器
      • ZIP

        public static final Zip ZIP
        zip压缩器
    • Constructor Detail

      • ZipEngine

        public ZipEngine()
    • Method Detail

      • compress

        public static byte[] compress​(java.lang.Object obj)
        压缩数据
        Parameters:
        obj - 要压缩的对象
        Returns:
        压缩后的字节数组或则原对象的字节数组
      • extract

        public static byte[] extract​(java.lang.Object obj)
        解压数据
        Parameters:
        obj - 要解压的对象
        Returns:
        解压后数据