FROM : Daniel DeCovnick
DATE : Thu Apr 24 17:28:47 2008
Er... either my calculator's broken or (65535 - 30 - 8 )/12 = 5458,
not 2727, where 30 and 8 are the resource map header and a single
reference type.
-Dan
On Apr 24, 2008, at 8:41 AM, glenn andreas wrote:
>
> On Apr 24, 2008, at 6:08 AM, Daniel DeCovnick wrote:
>
>> The tips are appreciated. AFAICT, the limit on total resource sizes
>> is within a kB or 2 of 2 or 4 GB, with the limitation that the last
>> resource must start within the first ~16 MB. Given the fact that
>> the files I'm opening are in the 1-300k range, I suspect I have
>> bigger problems than the resource file format if I start to
>> approach that limit.
>>
>> One thing I can't figure out though... why is the limit 2727?
>> Assuming you have only 1 resource type and no names, you can fit
>> exactly twice that many references in the map. It's not relevant to
>> my problem, but I am curious.
>
>
> Each resource entry is a 12 byte structure (2 byte ID, 2 byte offset
> to name, 1 byte flag, 3 byte offset to data, 4 bytes used as handle
> when loaded into memory). Combined with 2 byte offset limit on the
> size of the resource entry list, that gives 65535 / 12 = 2727.
>
>
> Glenn Andreas <email_removed>
> <http://www.gandreas.com/> wicked fun!
> Cardographer | the custom playing card designer
>
>
DATE : Thu Apr 24 17:28:47 2008
Er... either my calculator's broken or (65535 - 30 - 8 )/12 = 5458,
not 2727, where 30 and 8 are the resource map header and a single
reference type.
-Dan
On Apr 24, 2008, at 8:41 AM, glenn andreas wrote:
>
> On Apr 24, 2008, at 6:08 AM, Daniel DeCovnick wrote:
>
>> The tips are appreciated. AFAICT, the limit on total resource sizes
>> is within a kB or 2 of 2 or 4 GB, with the limitation that the last
>> resource must start within the first ~16 MB. Given the fact that
>> the files I'm opening are in the 1-300k range, I suspect I have
>> bigger problems than the resource file format if I start to
>> approach that limit.
>>
>> One thing I can't figure out though... why is the limit 2727?
>> Assuming you have only 1 resource type and no names, you can fit
>> exactly twice that many references in the map. It's not relevant to
>> my problem, but I am curious.
>
>
> Each resource entry is a 12 byte structure (2 byte ID, 2 byte offset
> to name, 1 byte flag, 3 byte offset to data, 4 bytes used as handle
> when loaded into memory). Combined with 2 byte offset limit on the
> size of the resource entry list, that gives 65535 / 12 = 2727.
>
>
> Glenn Andreas <email_removed>
> <http://www.gandreas.com/> wicked fun!
> Cardographer | the custom playing card designer
>
>






Cocoa mail archive

