Formats - Mastering and Packet

Settle back - this gets complicated. It is also based on my understanding not on authoritative sources. The results seem to work - the explanations you will see (and, I hope, follow) lead to the right sort of properties all around. However, anyone with authoritative information is invited to post to me privately so I can correct my errors.

As you will see, the physical properties of CD-ROM are significant in one area: there is no way to send the read head to a chosen spot on the disc. Instead, it must go to an approximate location, pick up synchronization bits, and then start writing based on that sync. Each time the head (laser beam) starts a read, it must do it from that space 'wasted' for sync.

The structure of the data and the TOC for a normal data disc (ISO 9660 Level 1) is really quite simple. Each file is written as a continuous stream of data; the TOC provides information on the start point and the size of the file. Mastering software (also called pre-mastering and authoring and typified by CDRWin and Easy CD Creator) supplies a stream of bytes to the disc for those files in sequence. To facilitate getting to each file, it needs to be tied to those sync bits; the effect is space wasted in much the same way as it is on a FAT16 - though the lost space is not really for clusters at all.

When you use variable-length packets in writing to a CD-R, two cases come up. If you write one file at a time, the packets (limited in size by the buffer of your drive) are written consecutively; if you have multiple, concurrent writes, each packet is written with a chunk of one file, but the next packet may be a chunk from another file. The packets are written consecutively - no gap between them - but they may be interleaved. Note that since you need to address packets separately, you need sync space for each. However, that's not usually critical since a variable-length packet is limited by the size of the buffer internal to your drive. If the file is small, it needs just one sync block. If it's big, the block is small enough compared with the total packet size to be negligible. Effectively, you're right back where you were in FAT16 or mastering.

When you finalize the session, the TOC is written in Level 3 format, which means that each file's pieces are properly connected. A runout track is also written during finalizing (closing) a session or the disc. So the net effect of variable-length packet writing is not very different from mastering when the disc or session has been finalized. Its advantage is, of course, that files can be written whenever you wish; you need not accumulate them between writes, though you need to pay the usual end-of-session penalty for the runout track.

When you use fixed-length packets, formatting is used to break the disc space into packet-sized chunks and a map is prepared to hold information on how the chunks make up the files. Every write to such a disc of a file larger than one packet is deliberately fragmented to help keep one area from being scrubbed (written, erased, rewritten) excessively. Those writes require separate seeks and complex bookkeeping on the map. So fixed-length packets take space for the packet delimiters and for the map. Writing them takes a lot of work in the CPU and memory (for the map) and space on the drive (for the seeks). As a result, the overhead includes bytes for each packet to sync the writing to the appropriate area of the disc. Finally, that map is not a FAT or even a TOC, so making it comprehensible requires that you install a translator (the UDF reader) if you want to read the disc on a conventional MultiRead drive. Since the runout track was written when you formatted, the disc needs no finalizing (in fact, none is possible) for it to work in a reader with that translator installed on your system.


E-mail me at cdrecording@mrichter.com
Return to Mike's home page