Class PackBits


  • public final class PackBits
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PackBits()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] compress​(byte[] bytes)  
      static byte[] decompress​(byte[] bytes, int expected)  
      private static int findNextDuplicate​(byte[] bytes, int start)  
      private static int findRunLength​(byte[] bytes, int start)  
      • Methods inherited from class java.lang.Object

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

      • PackBits

        private PackBits()
    • Method Detail

      • compress

        public static byte[] compress​(byte[] bytes)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • findNextDuplicate

        private static int findNextDuplicate​(byte[] bytes,
                                             int start)
      • findRunLength

        private static int findRunLength​(byte[] bytes,
                                         int start)