code: private static int maxOutputBufferLength(int inputLength) {
          double factor;
          if (inputLength < 200) {
              factor = 1.5;
          } else if (inputLength < 500) {
              factor = 1.2;
          } else if (inputLength < 1000) {
              factor = 1.1;
          } else if (inputLength < 10000) {
              factor = 1.05;
          } else {
              factor = 1.02;
          }
          return 13 + (int) (inputLength * factor);
      }
docs: Calculates maximum possible size of output buffer for not compressible data.