diff --git a/lib/encode.js b/lib/encode.js index a47f1e69..a2a726b0 100644 --- a/lib/encode.js +++ b/lib/encode.js @@ -149,8 +149,9 @@ function _getPrefix({isLegacy, compressionMode, registryEntryId}) { varintTagValue, varintByteValue } = _getVarintStructure(registryEntryId); if(varintByteValue) { - // define varintByteValue as first element in 2 element array - return [...varintTagValue, ...new Uint8Array([0x82]), ...varintByteValue]; + // Define varintByteValue as first element in 2 element array + // `0x82` means "the following is a 2 element array" + return [...varintTagValue, 0x82, ...varintByteValue]; } return varintTagValue;