code: func DecodeInt64(t Trits) (value int64, size uint64, err error) {
  	numTrits := uint64(len(t))
  
  	equal, err := TritsEqual(t[0:4], encodedZero)
  	if err != nil {
  		return 0, 0, err
  	}
  
  	if equal {
  		return 0, EncodedLength(0), nil
  	}
  
  	value = 0
  	var encodingStart uint64 = 0
  
  	for (encodingStart < numTrits) && (TritsToInt(t[encodingStart:encodingStart+TrinaryRadix]) <= 0) {
  		encodingStart += TrinaryRadix
  	}
  
  	if encodingStart >= numTrits {
  		return 0, 0, errors.New("encodingStart > numTrits")
  	}
  
  	encodingStart += TrinaryRadix
  	encodingLength := MinTrits((1 << (encodingStart / TrinaryRadix)) - 1)
  	encoding := TritsToInt(t[encodingStart : encodingStart+encodingLength])
  
  	// Bound checking for the lookup table
  	if encodingStart/TrinaryRadix > 13 {
  		return 0, 0, errors.New("encodingStart/TrinaryRadix > 13")
  	}
  
  	for i := 0; i < int(encodingStart/TrinaryRadix); i++ {
  		tryteValue := TritsToInt(t[i*TrinaryRadix : (i*TrinaryRadix)+TrinaryRadix])
  
  		if ((encoding >> uint(i)) & 1) == 1 {
  			tryteValue = -tryteValue
  		}
  		value += Pow27LUT[i] * tryteValue
  	}
  
  	return value, encodingStart + encodingLength, nil
  }
docs: // DecodeInt64 decodes a slice of trits with encoding information as an int64.