TLV library in C

Hello everyone!!

Does anyone know about a TLV library in C?

I have to write the contents of some buffer into disk using TLV format.

Thanks in advance!
Simply amazing what searching the internet can find:

GitHub - pcboy/libtlv: A TLV library in C

The DDG meta-search I used to find that link:

Another TLV library that provides encodings for multiple languages:

Maybe next time you should try searching before you ask, please. I had no clue what TLV is, never use it, so I searched and found out.
Like George, I have not had to use one and cannot recommend one random google result over another. Its always tough when you have a lot of choices -- I even found a TOP 20 page so you certainly have your work cut out deciding which one to use. Be aware that the type codes and exact details (endian, etc) may vary across implementations so if you need to talk to another program that uses it, you need to use the same library or the same encoding at least. If you get to decide both ends, its a lot easier, you don't even need a library, just make up your type code table & 3 or 4 lines would be done with it. Given the simplicity, I would probably do that to avoid a dependency you don't need.
Last edited on
Topic archived. No new replies allowed.