DtpDocument's Storage Format
Previous  Top 


Each document loads and saves from an associated archive file (*.hsf). This archive file is a storage box for multiple files, like a ZIP archive.

Whenever you load a document from a *.hsf file the archive file will remain opened during the life of the Document object. This is by design, so that the document does not have to load the complete archive at once.

All pages in the document have thumbnails, to give the user application a one-glance overview. The individual pages however, are not immediately loaded. Only when the user clicks on a page to open it in the viewer, will the page be loaded from the associated archive. This all speeds up working with the document.

Here are some points to consider as a consequence:
·During the life of the document object, the file remains opened (and *must* be accessible). So CD-ROMs or other removable media containing *.hsf files must remain in the drives while working with them  
·During the life of the document object, no other application can open the *.hsf file at hand with write access, or remove it.  

Notes about the *.hsf storage format
The storage format is implemented in 100% native Delphi. It is a flat file that can hold an unlimited amount of files inside. Currently, there is no intent to implement any compression techniques on the encapsulated files. The reason for this is that:
·Compression / decompression slows down the process  
·Files that are put in the archive are memory-efficient already, or just small  
·The eventual file can always be compressed by the end user using a thirdparty tool like ZIP.  

The *.hsf storage format is prepared for the future as it can store bigger sizes than the usual 4Gb limit.