Skip to content

Instantly share code, notes, and snippets.

@PragTob

PragTob/mp3.ex

Created Jul 19, 2017
Embed
What would you like to do?
mp3_byte_size = (byte_size(binary) - 128)
<< _ :: binary-size(mp3_byte_size), id3_tag :: binary >> = binary
<< "TAG",
title :: binary-size(30),
artist :: binary-size(30),
album :: binary-size(30),
year :: binary-size(4),
comment :: binary-size(30),
_rest :: binary >> = id3_tag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment