func RecOffsNthSize(offsets *[]uint64, n int) uint64 {
	if n == 0 {
		return (*offsets)[2:][1+n] & ((1 << 30) - 1)
	} else {
		return ((*offsets)[2:][1+n] - (*offsets)[2:][n]) & ((1 << 30) - 1)
	}
}
Reference MySQL rec_offs_nth_size method.
package utils
import (
	`bytes`
	`encoding/binary`
	`encoding/hex`
	`fmt`
	`github.com/zbdba/db-recovery/recovery/utils/logs`
	`io/ioutil`
	`math`
	`os`
	`os/exec`
	`strconv`
	`strings`
	`time`
)
func RecGetStatus(rec []byte, offset uint64) uint64 {
	return RecGetBitField1(rec, offset, 3, 0x7, 0)
}
func UtAlignOffset(rec []byte, AlignNo uint64) uint64 {
	return uint64(rec[0]) & (AlignNo - 1)
}
func GetIntValue(FixLength int, value []byte) interface{} {
	switch FixLength {
	case 1:
		v1 := (MatchReadFrom1(value) & 0x7F) | ((^MatchReadFrom1(value)) & 0x80)
		TinyInt := int(v1)
		TinyInt = TinyInt % TinyIntRange
		if TinyInt > (TinyIntRange/2-1) {
			TinyInt = TinyInt - TinyIntRange
		}
		return TinyInt
	case 2:
		v2 := (MatchReadFrom2(value) & 0x7FFF) | ((^MatchReadFrom2(value)) & 0x8000)
		SmallInt := int(v2)
		SmallInt = SmallInt % SmallIntRange
		if SmallInt > (SmallIntRange/2-1) {
			SmallInt = SmallInt - SmallIntRange
		}
		return SmallInt
	case 3:
		v3 := MatchReadFrom3(value)
		if (v3 >> 23) == 1 {
			v3 &= 0x007FFFFF
			return v3
		} else {
			return int64(v3) ^ (-1 << (3 * 8 - 1))
		}
	case 4:
		v4 := (MatchReadFrom4(value) & 0x7FFFFFFF) | ((^MatchReadFrom4(value)) & 0x80000000)
		IntValue := int(v4)
		IntValue = IntValue % IntRange
		if IntValue > (IntRange/2-1) {
			IntValue = IntValue - IntRange
		}
		return IntValue
	case 8:
		v8 := (MatchReadFrom8(value) & 0x7FFFFFFFFFFFFFFF) |
			((^(MatchReadFrom8(value))) & 0x8000000000000000)
		return int64(v8)
	}
	return 0
}
func GetUintValue(FixLength int, value []byte) uint64 {
	switch FixLength {
	case 1:
		return MatchReadFrom1(value)
	case 2:
		return MatchReadFrom2(value)
	case 3:
		return MatchReadFrom3(value) & 0x3FFFFF
	case 4:
		return MatchReadFrom4(value)
	case 5:
		return MatchReadFrom8(value) >> 24
	case 6:
		return MatchReadFrom8(value) >> 16
	case 7:
		return MatchReadFrom8(value) >> 8
	case 8:
		return MatchReadFrom8(value)
	}
	return 0
}