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