Re: BLOBs, MySQL, hex. Oh my
Re: BLOBs, MySQL, hex. Oh my
- Subject: Re: BLOBs, MySQL, hex. Oh my
- From: "Sherm Pendley" <email@hidden>
- Date: Thu, 8 May 2008 00:31:11 -0400
On Thu, May 8, 2008 at 12:19 AM, David Wilson <email@hidden>
wrote:
> On Wed, May 7, 2008 at 11:12 PM, Ben Einstein <email@hidden>
> wrote:
> > John's suggestion of getting rid of strlen was spot on; the code below
> works
> > extremely well if using [NSData length] a single time before the loop.
> >
> > What I'm still curious about is the difference in processing between
> the
> > NSImage and the zip archive. The same code and the same number of bytes
> but
> > orders of magnitude slower.
> >
>
> Is there still a difference in processing speed after swapping to
> using the length function? To be honest, I'm with John- the prior code
> couldn't possibly have been working. I think it's likely that either
> the images had a null byte very early in their data (not at all
> surprising) and as such were doing almost no work
According to /usr/share/file/magic, there's a byte flag at offset 18 that
indicates the presence of thumbnail info. That flag will be 0 for any jpeg
that doesn't have thumbnail info.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
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
References: | |
| >BLOBs, MySQL, hex. Oh my (From: Ben Einstein <email@hidden>) |
| >Re: BLOBs, MySQL, hex. Oh my (From: John Stiles <email@hidden>) |
| >Re: BLOBs, MySQL, hex. Oh my (From: Ben Einstein <email@hidden>) |
| >Re: BLOBs, MySQL, hex. Oh my (From: Ben Einstein <email@hidden>) |
| >Re: BLOBs, MySQL, hex. Oh my (From: "David Wilson" <email@hidden>) |