Single File System: Virtual File System Delphi Library
for Archive / Backup with Transparent Compression and Strong Encryption


Loads the entire contents of a stream into the file stream.

procedure LoadFromStream(Stream: TStream);

Use LoadFromStream to fill the file stream with the contents of the stream specified by the Stream parameter and transparently compress the data. LoadFromStream always sets the Position of the source stream to 0, before streaming in the number of bytes indicated by the source stream's Size property.

LoadFromStream resets the size of a file so that the contents of the source stream will fit exactly. It sets the Size property accordingly, and then reads the entire contents of the source stream into the compressed file stream. Thus, LoadFromStream will discard any pre-existing data stored in the compressed file.

If the source stream is a TFileStream object, LoadFromStream does the same thing as LoadFromFile, except that the application must create and free the TFileStream object. LoadFromStream also allows applications to fill a compressed file stream object from other types of stream objects.

Note:   We recommend that you use the LoadFromStream instead of the CopyFrom method as it works much faster.

© 2000-2004 AidAim Software LLC Single File System: Single-file Delphi Virtual File Syste