comparison DOCS/tech/mpcf.txt @ 17547:114699930136

Allow headers to be repeated anywhere
author ods15
date Tue, 07 Feb 2006 04:03:11 +0000
parents 86a9a60ef596
children 6c3ca4e1fceb
comparison
equal deleted inserted replaced
17546:d878e3e313eb 17547:114699930136
1 ======================================== 1 ========================================
2 NUT Open Container Format DRAFT 20060203 2 NUT Open Container Format DRAFT 20060207
3 ======================================== 3 ========================================
4 4
5 5
6 6
7 Intro: 7 Intro:
678 ... 678 ...
679 stream_header (id=n) 679 stream_header (id=n)
680 680
681 headers may be repeated, but if they are, then they MUST all be repeated 681 headers may be repeated, but if they are, then they MUST all be repeated
682 together and repeated headers MUST be identical 682 together and repeated headers MUST be identical
683 headers MAY only repeat at the closest possible positions after 2^x where x is 683
684 Each set of repeated headers not at the beginning or end of the file SHOULD
685 be stored at the earliest possible position after 2^x where x is
684 an integer and the file end, so the headers may be repeated at 4102 if that is 686 an integer and the file end, so the headers may be repeated at 4102 if that is
685 the closest position after 2^12=4096 at which the headers can be placed 687 the closest position after 2^12=4096 at which the headers can be placed
688
689 Note: this allows an implementation reading the file to locate backup
690 headers in O(log filesize) time as opposed to O(filesize)
686 691
687 headers MUST be placed at least at the start of the file and immediately before 692 headers MUST be placed at least at the start of the file and immediately before
688 the index or at the file end if there is no index 693 the index or at the file end if there is no index
689 headers MUST be repeated at least twice (so they exist three times in a file) 694 headers MUST be repeated at least twice (so they exist three times in a file)
690 695