Skip to content

Instantly share code, notes, and snippets.

@davidwhitney
Created December 9, 2013 11:49
Show Gist options
  • Save davidwhitney/7871112 to your computer and use it in GitHub Desktop.
Save davidwhitney/7871112 to your computer and use it in GitHub Desktop.
ID3 tag kata
The MP3 file format, didn't provide any means for including metadata about the song. ID3 tags were invented to solve this problem.
You can tell if an MP3 file includes ID3 tags by examining the last 128 bytes of the file. If they begin with the characters TAG, you have found an ID3 tag. The format of the tag is as follows:
TAG song artist album year comment genre
The spec is here: http://id3.org/ID3v1
Kata source: http://rubyquiz.com/quiz136.html
Sample file: http://www.mfiles.co.uk/mp3-downloads/edvard-grieg-peer-gynt1-morning-mood.mp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment