This was written by me, MeanOne (meanone@frontier.gulf.net), and if you have any comments or suggestions,
you should email them to me at once! :)

Below is a pretty good description of the methods and properties of a TStuffItStream.

Oh yeah, to do the demo, you need to copy the stuffitstream.dcu unit into the demo directory.

========================================================
stuffitstream.dcu=======================================
========================================================

TStuffItStream = class(TFileStream)

------------------------------------------------------------------------
-Methods-
------------------------------------------------------------------------

========================================================
TStuffItStream.Create ( filename  :  string;  mode  :  word );
--------------------------------------------------------

Of course, the filename is the name of the file to load, and the
mode is the way to open the file.


Possible File Modes
--------------------------------------------------------

Value		 Meaning

fmCreate	 Create a file with the given name. If a file with the given name exists, open the file in write mode.
fmOpenRead	 Open the file for reading only.
fmOpenWrite	 Open the file for writing only. Writing to the file completely replaces the current contents.
fmOpenReadWrite	 Open the file to modify the current contents rather than replace them.

The share mode must be one of the following values:

Value		 Meaning

fmShareCompat	 Sharing is compatible with the way FCBs are opened.
fmShareExclusive Other applications can not open the file for any reason.
fmShareDenyWrite Other applications can open the file for reading but not for writing.
fmShareDenyRead	 Other applications can open the file for writing but not for reading.
fmShareDenyNone	 No attempt is made to prevent other applications from reading from or writing to the file.

Note: Most of the time, you'll use just "fmOpenRead". (if you are unsure, use this)

Example
--------------------------------------------------------

var mystuffitstream : tstuffitstream;

begin;
   mystuffitstream := tstuffitstream.create( 'mystuffitfile', fmOpenRead or fmShareExclusive );
   //processing
   mystuffitstream.free;
end;

========================================================


========================================================
TStuffItStream.Free;
--------------------------------------------------------

If you don't know what this is, you should be shot. ;)

Example
--------------------------------------------------------

var mystuffitstream : tstuffitstream;

begin;
   mystuffitstream := tstuffitstream.create( 'mystuffitfile', fmOpenRead );
   //processing
   mystuffitstream.free;
end;

========================================================


========================================================
TStuffItStream.SeekResource( resource_name : string ) : boolean;
--------------------------------------------------------

The resource_name variable is the name of the resource
you want to move the position of the TStuffItStream to.

If it's found, the return value is true, if it's not, it
returns false. (Duh!)

Example
--------------------------------------------------------

var mystuffitstream : tstuffitstream;

begin;
   mystuffitstream := tstuffitstream.create( 'mystuffitfile', fmOpenRead );
   if mystuffitstream( 'mystuffitresource' ) then image1.picture.bitmap.loadfromstream(mystuffitstream) else messagedlg('Uh oh! It didn't load right!', mtError, [mbOk], 0);
   //processing
   mystuffitstream.free;
end;

========================================================


------------------------------------------------------------------------
-Properties-
------------------------------------------------------------------------

========================================================
TStuffItStream.Count : Integer;
--------------------------------------------------------

This is a count of the number of resources loaded.
(good way to check to see if all of your resources
were loaded)

Example
--------------------------------------------------------

var mystuffitstream : tstuffitstream;

begin;
   mystuffitstream := tstuffitstream.create( 'mystuffitfile', fmOpenRead or fmShareExclusive );
   //processing
   if mystuffitstream.count<>2 then messagedlg('Uh oh! It didn't load right!', mtError, [mbOk], 0);
   mystuffitstream.free;
end;

========================================================


========================================================
TStuffItStream.Names : TStringList;
--------------------------------------------------------

This is a list of the resources loaded.

Example
--------------------------------------------------------

var mystuffitstream : tstuffitstream;

begin;
   mystuffitstream := tstuffitstream.create( 'mystuffitfile', fmOpenRead or fmShareExclusive );
   //processing
   showmessage(mystuffitstream.names[0]); // would show the first resource name
   mystuffitstream.free;
end;

========================================================


========================================================
Comments
--------------------------------------------------------

TStuffItStreams are only limited by disk space. They can
accept *any* type of file, you just have to know how
to deal with it in Delphi. Memos, pictures, and components
all use streams to save data, and you can use Stuff It!
to put them all together easily.

========================================================