with Allegro.Files; use Allegro.Files;
package Streams.Packfiles is
type Packfile_Stream is new Root_Stream_Type with private;
type A_Packfile_Stream is access all Packfile_Stream'Class;
function Open_Stream( filename, mode : String ) return A_Packfile_Stream;
function Stream( f : not null A_Packfile ) return A_Packfile_Stream;
procedure Close( stream : in out A_Packfile_Stream );
function EOF( stream : access Packfile_Stream ) return Boolean;
function Error( stream : access Packfile_Stream ) return Boolean;
private
type Packfile_Stream is new Root_Stream_Type with record
packfile : A_Packfile := null;
doClose : Boolean := False;
end record;
procedure Read( stream : in out Packfile_Stream;
item : out Stream_Element_Array;
last : out Stream_Element_Offset );
procedure Write( stream : in out Packfile_Stream;
item : Stream_Element_Array );
end Streams.Packfiles;