Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
TZipForge.AddFromStream
TZipForge
Top 


Adds data stored in a TStream descendant object to the archive.

procedure
AddFromStream(FileName: String; Stream: TStream; CopyToBuffer: Boolean = True; Position: Integer = 0; Count: Integer = 0; Attr: Integer = faArchive; DateTime: TDateTime = 0);

Description


Use AddFromStream to compress data stored in the TStream descendant object like TFileStream, TMemoryStream or TBlobStream to the file inside the archive.

The FileName parameter specifies file name that will be used to store data from the TStream descendant object.

The CopyToBuffer specifies whether to copy data from stream to internal buffer before compressing. Setting CopyToBuffer to true could be useful while adding data from multiple streams in a transaction, where the source streams are destroyed before the EndUpdate call.

The Position determines starting position in Stream for adding data to the archive.

Count specifies size of the data in Stream for adding to the archive. If Count = 0 size of the data will be Stream.Size - Position.
If Count > 0 then AddFromStream copies stream data to the internal memory stream before processing.
By default all Stream contents will be added to the archive.

The Attr parameter specifies file attributes which will be assigned to the stored file.

The DateTime parameter specifies file date and time which will be assigned to the stored file.

Note: While using multiple AddFromStream calls within a single transaction, keep in mind that you may get an error if a stream object is destroyed before the call to the EndUpdate method. Please note that you should use separate stream objects for each AddFromStream call if you don't pass Count > 0 parameter.

        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Apr 19, 2024 
        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Apr 19, 2024