quote:
Originally posted by Millenium_edition
well i was a bit late because now you've come up with the chunks. and now you studied it.
but as far as i've read, can't you add a animdpsize="123456" to the <msnobj> tag, so you got the length, all you have to do is get the rest of the file, instead of decoding all those damn chunks...
That would involve interacting with the protocol. But what will that do for people without the "plugin"? It could work though. But it would be nice, IMO, if you don't need to interact with the protocol at all (which isn't so easy with plugins anyway I assume). Call me a standard and compatibily(damn word)-freak
BTW, you don't need to decode those other chuncks. That's the beauty of it, just read the type of chunck, if it isn't yours, skip it. And for writing, if it isn't yours, just copy it. No decoding involved...
EDIT: Oh, lhunath. I've got another small tip for you
Instead of storing the GIF in the chunck like it is. add 1 byte in front of it to identify the method you used to store the GIF. Thus it will act like kind of a version number.
I mean instead of this:
----start of chunck data----
[Animated GIF (x bytes long)]
----end of chunck data----
Do this:
----start of chunck data----
[Identifier byte (1 byte long)]
[Animated GIF (x bytes long)]
----end of chunck data----
In that way, you can identify your method you used to store the GIF. This is very handy, because if you ever update the method of storing (say, you found a way to store it in a more compact way), you only have to make a new identifier (and thus acting like a version number) for your new method. In that way, the old method can still be read by your plugin because it can identify the method used for storing the GIF. If you don't use such a identifier, your plugin wont be compatible with older versions as it has no way of identifying and thus knowing what to do with the data... And that goes for the otherway around also: If someone is still using your "old" plugin, he can be notified that the PNG/GIF is written in a newer version and thus can't be read, because the "old" plugin doesn't reconize the "new" identifier and thus doesn't know the new method of extracting the GIF....
If you know what I mean
(again, a big explaination for something extremely simple and it will be benefitial for the futur)