• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Resource Fork - is this a good use/the right thing to do?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resource Fork - is this a good use/the right thing to do?


  • Subject: Re: Resource Fork - is this a good use/the right thing to do?
  • From: Daniel DeCovnick <email@hidden>
  • Date: Thu, 24 Apr 2008 11:28:47 -0400

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@hidden <http://www.gandreas.com/> wicked fun! Cardographer | the custom playing card designer



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Resource Fork - is this a good use/the right thing to do?
      • From: "Hamish Allan" <email@hidden>
References: 
 >Resource Fork - is this a good use/the right thing to do? (From: Daniel DeCovnick <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Jens Alfke <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Daniel DeCovnick <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Uli Kusterer <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Daniel DeCovnick <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Chris Suter <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Graham Cox <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Chris Suter <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Graham Cox <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Daniel DeCovnick <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Chris Suter <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Daniel DeCovnick <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Uli Kusterer <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Daniel DeCovnick <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: glenn andreas <email@hidden>)

  • Prev by Date: Re: NSTextView text coloring problem
  • Next by Date: Re: NSTextView text coloring problem
  • Previous by thread: Re: Resource Fork - is this a good use/the right thing to do?
  • Next by thread: Re: Resource Fork - is this a good use/the right thing to do?
  • Index(es):
    • Date
    • Thread