TLV

From Helpful
Jump to navigation Jump to search
This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.


Type–length–value is a way of laying out a file/bytestream to contains multiple things,

namely as a series of chunks that are

  • type of the this chunk
  • length of that data that follows
  • that data


This is

  • fastish to seek through even without an index
in that you can seek forward that length, and know you are on the next chunk.
  • extensible
in the sense that any reader, faced with a chunk type they do not know, can just ignore and skip it


The best-known implementation example of this idea may be Interchange File Format (IFF), e.g. as used in WAV files and others,

and broadly-but-not-always-strictly followed in JPEG, TIFF (not IFF),