Three methods are commonly used for representing variable lengthdata in a computer memory: 1. linked linear lists, 2. prefixing the data item with a length indicator, and 3. storing a special termination symbol at th...
详细信息
Three methods are commonly used for representing variable lengthdata in a computer memory: 1. linked linear lists, 2. prefixing the data item with a length indicator, and 3. storing a special termination symbol at the end of the data item. Although the third method can possibly be used to represent data items of unlimitedlength in a computer memory, an adaptation of the second method works more effectively to serve this purpose. In the adaptation, the prefix, or length field, can itself be variable in length. One can define a recursive structure for the syntax of a length specification in such a way that no limit is imposed on the length of the subject data item and the number of length fields. When encoding numbers, the radix should be chosen to minimize overhead in the most frequently used range of lengths.
暂无评论