Re: [AD] Allegro 3.12, LZSS compression routines, pack_fseek()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2003-05-14, Ulrike <ollym@xxxxxxxxxx> wrote:
> Hi there,
> 
> there's a question spinning around in my head. Can one extend the pack_fseek()
> so that it supports everything the Windows SetFilePointer() routine is able to do, that is
> 
> 1. moving anywhere with negative and positive offsets
> 2. moving anywhere with relative and absolute offsets

Basically, it's not practically possible.  Take a look at the
decompression code (or the textual description of the decompression
algorithm somewhere in the docs directory of Allegro 4.x) and you'll see
what I mean.

> Background:
> I'm planning out a complete custom loader for the DirectMusicLoader8 interface that will make use
> of a function that supports seeking backward and forward with absolute and relative seek mode.
> I use the Allegro 3.12 LZSS compression routines to store all game related stuff like bitmaps, WAVs and MIDIs
> similar to the Allegro datafiles.

I would suggest you not to use Allegro's compression code in that case,
or decompress each logical file into a temporary memory buffer or disk
file, then load from the temporary storage.

-- 
王浩禎




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/