nebulous packfiles (was Re: [AD] pack_ungetc) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2002-07-11, Vincent <Vincent.Penquerch@xxxxxxxxxx> wrote:
> > However, I've been thinking about a layered I/O interface,
> > where data
> > could be read from/written to disk, memory, network, etc. I
>
> Ah, the idea back :)
> Excellent!
Yup.
> IIRC, I had this nebulous view of a PACKFILE which was
> polymorphic, and could be used for net/mem/whatever.
> Are you thinking about something like this too ?
Yes. There are probably lots of ideas in the archive, but for now I'm
thinking of the simple model of a chain of filters connected together,
terminated by an "I/O unit". The I/O unit is the part that actually
reads from/writes to disk/mem/whatever. Filters do encryption,
compression, etc. When reading, the data comes out of the I/O device
and passes through the filters before reaching the user. Writing goes
in the reverse direction.
I did write recently a prototype of this, but it wasn't in C and it's
incomplete, so there are probably big obstacles in the way.
--
王浩禎