long templateId support in ring and FAST encode/decode