code: public static byte[] compress(byte[] value, int prefix) throws SupportException {
          Deflater compressor = cLocalDeflater.get();
          if (compressor == null) {
              cLocalDeflater.set(compressor = new Deflater());
          }
  
          ByteArrayOutputStream bos = new ByteArrayOutputStream(value.length);
  
          try {
              bos.write(value, 0, prefix);
              DeflaterOutputStream dout = new DeflaterOutputStream(bos, compressor);
              dout.write(value, prefix, value.length - prefix);
              dout.close();
              return bos.toByteArray();
          } catch (IOException e) {
              throw new SupportException(e);
          } finally {
              compressor.reset();
          }
      }
docs: Encodes into compressed form.
  
  @param value value to compress
  @param prefix prefix of byte array to preserve
  @return compressed value
  @throws SupportException thrown if compression failed