code: @Override
    public int readInt() throws IOException {
      byte[] intBytes = new byte[4];
      int i = in.read(intBytes);
      if (i < 4) {
        throw new EOFException();
      }
      intBytes[0] = (byte) (intBytes[0] ^ 0x80);
  
      int value = 0;
      for (int j = 0; j < intBytes.length; ++j) {
        value = (value << 8) + (intBytes[j] & 0xff);
      }
      return value;
    }
docs: A int was written by flipping the sign bit, and writing it as a big endian
  int.
  
  To decode, we do the reverse, flipping the sign bit, and reading the int
  from the bytes.
  
  @return The decoded int.