d using convertbits function.
   IndexedData = [0,1,2,3,4].
  
   % Define an unindexed string (a raw one)
   UnindexedData = [$n,$o,$s,$t,$r].
   UnindexedData = "nostr".
  
   % bech32 encoding using bech32 format with indexed string.
   "test1qpzryyr0hjg"
      = bech32:encode_bech32(HRP, IndexedData).
   {ok, "test1qpzryyr0hjg"}
      = bech32:encode(HRP, IndexedData, [{format, bech32}]}).
  
   % bech32 encoding using bech32m format with indexed string.
   "test1qpzry3llmh2" = bech32:encode_bech32m(HRP