77
77
</ dt >
78
78
< dd >
79
79
Similar to version 1 except that the 32Kb size limit was lifted (now 2Gb).
80
- Also only for backing up the user database.
80
+ Used only for backing up the user database.
81
81
</ dd >
82
82
< dt >
83
83
Version 3
84
84
</ dt >
85
85
< dd >
86
- Similar to Versions 1 and 2. Nowused for backing up both the user database
87
- and the main database. An file ID field was added to allows which database
86
+ Similar to Versions 1 and 2. Now used for backing up both the user database
87
+ and the main database. A file ID field was added to specify which database
88
88
was backed up. The file ID generalises to any file.
89
89
</ dd >
90
90
< dt >
132
132
< dd >
133
133
This file format uses pure binary raw data. The watermark part of the file
134
134
header is written in ASCII. File names are stored as UTF-8. All other
135
- information, including file contents is stored as raw binary.
135
+ information is stored as raw binary.
136
136
</ dd >
137
137
</ dl >
138
138
285
285
< code > 'DBAC'</ code > for user database backup.
286
286
</ li >
287
287
</ ul >
288
- Other IDs could be used for other backup types.
289
288
</ dd >
290
289
< dt >
291
290
< code > FileCount</ code >
371
370
< code > 'DBAC'</ code > for user database backup.
372
371
</ li >
373
372
</ ul >
374
- Other IDs could be used for other backup types.
375
373
</ dd >
376
374
< dt >
377
375
< code > FileCount</ code >
@@ -420,13 +418,13 @@ <h2>
420
418
421
419
< p >
422
420
Code that writes backup files should only ever write the latest available file
423
- format at the time the code was written. It should never attempt to write
421
+ format at the time the code was written. It musr never attempt to write
424
422
earlier versions.
425
423
</ p >
426
424
427
425
< p >
428
- Code that restores backup files be able to interpret all earlier formats in
429
- addition to the current one because the program may to restore data from an
426
+ Code that restores backup files must be able to interpret all earlier formats in
427
+ addition to the current one, because the program may need to restore data from an
430
428
old backup file. If the code detects a later version than it was designed for
431
429
it should display an error message and terminate.
432
430
</ p >
437
435
438
436
< p >
439
437
Some earlier versions of the backup restoration code have faults in that they
440
- will attempt to read later backup file versions than thosethey were designed
441
- for. By good fortune factors in the design of later file formats mean that the
442
- reading code always abandons the reading, albeit with no error message. These
438
+ will attempt to read later backup file versions than those they were designed
439
+ for. By good fortune, factors in the design of later file formats mean that the
440
+ reading code always abandons reading later , albeit with no error message. These
443
441
problems are:
444
442
</ p >
445
443
@@ -455,11 +453,10 @@ <h3>
455
453
</ div >
456
454
< div class ="half-spaced ">
457
455
The reading code expects backup files to begin with a file count as a text
458
- hex representation of a SmallInt. In file version 2 and later the first
456
+ representation of a SmallInt in hex . In file version 2 and later the first
459
457
four ANSI chars of the file are < code > 'FFFF'</ code > , which decodes as
460
458
< code > -1</ code > . The reader interprets this value as meaning there are no
461
- files in the backup and does nothing, leaving the existing database
462
- intact.
459
+ files in the backup and does nothing.
463
460
</ div >
464
461
</ dd >
465
462
< dt >
473
470
In v3 files the file ID is recorded in the same location and same format
474
471
as the v2 file format expects to find the file count. Luckily the only two
475
472
values in use as File IDs are < code > 'CBAC'</ code > and < code > 'DBAC'</ code > ,
476
- both of which decode as negative integers. The reader software interprets
473
+ both of which decode as negative integers expressed in hex . The reader software interprets
477
474
this as meaning there are no files in the backup.
478
475
</ div >
479
476
< div class ="helf-speed ">
@@ -495,11 +492,11 @@ <h3>
495
492
work with file format v3 will also try to read later file versions. It
496
493
looks for its file count in a hex encoded SmallInt value at position 12 in
497
494
the backup file. File format v4 was designed to have a padding value of
498
- < code > '0000'</ code > in this location. Agains this fools the reader software
495
+ < code > '0000'</ code > in this location. This fools the v3 reader software
499
496
into thinking there are no files in the backup.
500
497
</ div >
501
498
< div class ="half-spaced ">
502
- From CodeSnip v3.8.6 the file reader works correctly.
499
+ From CodeSnip v3.8.6 the file reader works correctly and exits with an error when an unsupported backup file version is encountered .
503
500
</ div >
504
501
</ dd >
505
502
</ dl >
533
530
File format version 1
534
531
</ dt >
535
532
< dd >
536
- Watermark: < code > ''</ code >
533
+ Watermark: < code > ''</ code > (empty)
537
534
</ dd >
538
535
< dt >
539
536
File format version 2
558
555
< p >
559
556
It can be seen that the version number at byte offset 4 is not necessary for
560
557
identification if the watermark is made longer. However, it should always be
561
- used because earlier versions of the file readers use it to determine which
562
- format is to be read.
558
+ used because earlier versions of the file readers may use it to determine which
559
+ format version is to be read.
563
560
</ p >
564
561
565
562
</ body >
0 commit comments