Daniel Grace wrote: > On Apr 2, 2005 1:40 AM, Christian Biere <[EMAIL PROTECTED]> wrote: > > I'm not sure what's the best place to put the tigertree. One > > possibility is to use the fileinfo infrastructure and just > > put it into the partial file. Otherwise, the tigertree needs > > to put into a separate file which is somewhat uglier to handle. > I wasn't even thinking of where to store stuff when gtk-gnutella is > closed. That _is_ an interesting problem. If we stick it in the > partial file, we risk breaking the ability to view/read/hear the > partial.
The fileinfo stuff is added behind the end of the file. If the download is finished, the file is truncated to get rid of that. > I know that mplayer is pretty good about playing movies/music > even if it has garbage at the beginning, but I don't think we should > assume that everyone will be using such forgiving programs. Well, since it's not at the beginning but the the end, there shouldn't be a problem for files that can actually be used as partials at all. I don't even had problems with pre-viewing JPEGs this way. If the player/viewer is broken, it's broken - not our problem, IMNSHO. > > One further issue is that Gtk-Gnutella cannot download files > > without knowing the filesize in advance. There were some > > half-baken attempts to fix this but it's very bug at the moment. > Cannot download without knowing the filesize in advance? Ouch. I can > see where that might be a problem though, given untrusted sources. Technically, we cannot "trust" the filesize from the search results either. It's really just a problem in the download logic which uses the filesize for hashtables and creating the fileinfo trailer. This would need to be delayed until the first source could be contacted. If the sources then disagree about the filesize that's actually not different from now. Anyway, maybe it's not that good to reuse the download facility to download the tigertree at all. It might be better to use the lower level http stuff e.g., like gwebcache.c. -- Christian
pgpo4DgimnxWw.pgp
Description: PGP signature
