lib313

lib313 is a small C library for packing/unpacking ID3v1.3 tags. Please read ID3v1.3 specification if you haven't done it yet, it makes understanding of the library much simpler.

Download

You can download the sources of the library from its page on SourceForge: http://sourceforge.net/projects/lib313/files/

API

The library has pretty simple programming interface which consists of the following three functions defined in lib313.h:

int lib313_estimate(const struct lib313_tag *tag);
int lib313_pack(char *buf, const struct lib313_tag *tag);
int lib313_unpack(struct lib313_tag *tag, const char *buf);

lib313_estimate()

This function calculates remaining free space in the extension space for the specified tag. An application can use it to inform user about amount of available space. In case of overflow this function returns negative value with number of truncated bytes.

lib313_pack()

This function packs tag into a byte array of length 128 bytes.

lib313_unpack()

This function unpacks tag from a byte array of length 128 bytes. It returns 0 (LIB313_SUCCESS) on success, or negative error value otherwise.

Copyright

Copyright © 2009–2010 Vitaly Sinilin