[Scummvm-devel] kMD5FileSizeLimit = 1024 * 1024

Max Horn max at quendi.de
Sat Aug 5 11:06:57 CEST 2006


Am 05.08.2006 um 03:38 schrieb Paul Gilbert:

> On 8/5/06, Max Horn <max at quendi.de> wrote:
>
>> PROPOSAL: The constant kMD5FileSizeLimit is currently set to
>> 1024*1024 (=1MB) in four engines (SCUMM, Kyra, Lure, Gob). I propose
>> that we reduce this to a lower number, something between 4 and 128kb,
>> depending on the engine.
>> In particular, for reasons recently discussed on this list, the SCUMM
>> engine would be changed to use 128kb. I am not sure what would be
>> suitable limits for the other engines.
>
> As the developer for the Lure engine, I certainly don't have any
> objections to reducing it - given that the .vga file format starts
> with an offset table, I should be able to detect the different
> language versions from even a kilobyte. On a technical note, since the
> MD5 is only used for detection of language versions (as opposed to
> validating the complete files are unchanged), is there any reason not
> to keep the size limit as small as convenient? Maybe even less than a
> kilobyte? Doing so would certainly help speed up directory scans.


You can do that, if you think it'll be sufficient to cover all cases.  
In fact, you are not obliged to use MD5 at all, if there is another  
method with which you can distinguish the files reliably, do so! E.g.  
maybe the value of the long at offset XYZ is sufficient or so... If  
that's the case, fine :-)


Bye,
Max





More information about the Scummvm-devel mailing list