Personal Backup Version 6.0
|© 2001 − 2019, Dr. J. Rathlev|
From Version 5.0, Personal Backup has been created using an IDE
which has full Unicode support (currently
Delphi 10 Seattle).
So the ANSI (ISO-8859) filenames limitations on copying files are obsolete.
In addition, path lengths may be longer than 260 characters.
The most important enhancements:
The existing standard for the gzip format (RFC1952 of 1996) calls for the filename to be stored in the file header using the ISO-8859-1 character set. I could not find any recommendations as to how to handle Unicode filenames.
The current Linux version of the program gzip used for creating and reading gz archives differs from the above standard and stores filenames in UTF-8 format. The OS byte in the header is set to 3 (Unix).
Until now, Personal Backup has set this byte to 0 (FAT) and saved the filename per ISO-8859-1. To be compatible with previous versions and also to support Unicode, two variants are used in Version 5:
Hence the problem arises that other programs (such as WinZip or WinRar) will correctly detect the stored filename only with the first variant. This has, however, no effect on the unpacking of the files.
It would of course be better to use the unused bit 5 of the FLG byte as a criteria for the coding of the filename. The current zip format does it in this way (see below).
The existing standard for the gzip format (RFC1952 of 1996) reserves a 32 bit value for the length of the uncompressed file. For files > 4 GB this value is written module 232. But like many file archive programs (e.g. 7-zip), Personal Backup supports the use of an extra field with the signature 0x0100 containing the real file size.
For more details refer to the description below.
The current zip format specification version 6.3.2 from October 2007 defines how Unicode filenames are to be processed: if bit 11 of the "general purpose bit flag" is set, filename and comment are in UTF-8 coding. Personal Backup uses this convention. Most of the current file-compression programs now support this new format, too. Among those that do are WinZip Version 12, WinRar Version 3.80 and 7-Zip Version 9.20, whereas Windows Explorer does not yet support the new format even under Windows 7.
Files are encrypted using the AES method, with the same routines as in WinZip (see Info at WinZip and at Brian Gladman). The file format created depends on the backup mode:
Signature : 4 Bytes: JREx (since version 5.8.5) Enc-Header : 10, 14 or 18 bytes (depending on the encryption depth): Salt value (8, 12 or 16 bytes) + password verification value (2 bytes) Enc-Data : Same number of bytes as original file Enc-Trailer: 10 bytes Authentication code
Gzip-Header : 10 bytes as default new: Flag byte: bit 5 = encrypted Extra field : (ID=1) Optional for files > 4GB - 20 bytes Extra field : (ID=$524A) Signature JR + specification of the encryption depth (since version 5.8.5) - 6 bytes Filename : ISO-8859-1 (OS=0 - FAT) or UTF-8 (OS=11 - NTFS) Enc-Header : 10, 14 or 18 bytes (depending on the encryption depth) Enc-Data : Same number of bytes as compressed original file Enc-Trailer : 10 bytes (see above) Gzip-Trailer: 8 bytes CRC always = 0
Amendment to the WinZip format: Local File Header / Central Directory Header: general purpose bit flag - Bit 8: filenames are encrypted Extra Data Field for encrypted filenames ---------------------------------------- Offset Size Contents 0 2 Header ID of extra field (0x9909) 2 2 Data size (n) in bytes (variable) 4 n Encrypted filename
All passwords for FTP, for SMTP and AES encryption must be coded per ISO-8859-1.
For filenames (inc. path), the 260-character limitation still applies to
all Windows versions at certain points.
This affects all applications using the non-Unicode versions of the Windows API calls
and under Windows XP also all applications using the Windows Shell components, such as
Explorer. This limitation appears no longer to apply first of all under Windows 7.
Everywhere where Personal Backup refers to shell components (e.g. in a directory- or file-selection dialog), the path length limitation applies even for Version 5 except with Windows 7 and newer.
Internally, the program uses the path prefix "\\?\" for all file processing functions (e.g. when copying files) whereby a maximum length of about 32000 characters is allowed. With Version 5 it is therefore possible to backup, restore and delete files with paths exceeding the above limit, even when some other programs (including Windows XP Explorer) will fail on scanning such a directory tree. One file manager that supports long filenames is Total Commander Version 7.5 .