title: Encoding Spotify URI to Spotify Codes
body: <p><a href="https://www.spotifycodes.com/index.html#" rel="noreferrer">Spotify Codes</a> are little barcodes that allow you to share songs, artists, users, playlists, etc. </p>
  
  <p>They encode information in the different heights of the "bars". There are 8 discrete heights that the 23 bars can be, which means 8^23 different possible barcodes. </p>
  
  <p>Spotify generates barcodes based on their URI schema. This URI <code>spotify:playlist:37i9dQZF1DXcBWIGoYBM5M</code> gets mapped to this barcode: </p>
  
  <p><a href="https://i.stack.imgur.com/vqF0X.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/vqF0X.jpg" alt="Spotify code barcode"></a></p>
  
  <p>The URI has a lot more information (62^22) in it than the code. How would you map the URI to the barcode? It seems like you can't simply encode the URI directly. For more background, see my "answer" to this question: <a href="https://stackoverflow.com/a/62120952/10703868">https://stackoverflow.com/a/62120952/10703868</a></p>