This may seem rather overanalyzed, but I was reading through the code and found a potential pitfall in the String function of the AttributeEncoder type.
Isn't the following check necessary to prevent the length field of the attribute being appended from overflowing?
if len(s) > math.MaxUint16-nlaHeaderLen {
ae.err = errors.New("Attribute length overflow")
return
}