code: public static void encode(int value, byte[] dst, int dstOffset) {
          value ^= 0x80000000;
          dst[dstOffset    ] = (byte)(value >> 24);
          dst[dstOffset + 1] = (byte)(value >> 16);
          dst[dstOffset + 2] = (byte)(value >> 8);
          dst[dstOffset + 3] = (byte)value;
      }
docs: Encodes the given signed integer into exactly 4 bytes.
  
  @param value signed integer value to encode
  @param dst destination for encoded bytes
  @param dstOffset offset into destination array