func (d *Decoder) DecodeInt() (int32, int, error) {
	var buf [4]byte
	n, err := io.ReadFull(d.r, buf[:])
	if err != nil {
		msg := fmt.Sprintf(errIODecode, err.Error(), 4)
		err := unmarshalError("DecodeInt", ErrIO, msg, buf[:n], err)
		return 0, n, err
	}
	rv := int32(buf[3]) | int32(buf[2])<<8 |
		int32(buf[1])<<16 | int32(buf[0])<<24
	return rv, n, nil
}
DecodeInt treats the next 4 bytes as an XDR encoded integer and returns the
result as an int32 along with the number of bytes actually read.

An UnmarshalError is returned if there are insufficient bytes remaining.

Reference:
RFC Section 4.1 - Integer
32-bit big-endian signed integer in range [-2147483648, 2147483647]
package xdr
import (
	"fmt"
	"io"
	"math"
	"reflect"
	"strconv"
	"time"
)
const maxInt32 = int(^uint32(0) >> 1)
var errMaxSlice = "data exceeds max slice limit"
var errIODecode = "%s while decoding %d bytes"
func Unmarshal(r io.Reader, v interface{}) (int, error) {
	d := Decoder{r: r}
	return d.Decode(v)
}
type Decoder struct {
	r io.Reader
}