Single File System: Virtual File System Delphi Library
for Archive / Backup with Transparent Compression and Strong Encryption
Loads the entire contents of a file into the SFS file stream.
procedure LoadFromFile(const FileName: string);
Use LoadFromFile to fill the file stream with the contents of a file and transparently compress the data. Pass the name of the file as the FileName parameter. LoadFromFile allows an application to read the contents of a file into the SFS file stream without having to explicitly create and free a file stream object.
LoadFromFile resets the size of the compressed stream so that the contents of the file will fit exactly. It sets the Size property accordingly, and then reads the entire contents of the file into the compressed stream. Thus, LoadFromFile will discard any pre-existing data stored in the compressed file stream.
Note: We recommend that you use the LoadFromFile instead of the CopyFrom method with TFileStream as it works much faster.