Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"11-26-08 - Oodle"

5 Comments -

1 – 5 of 5
Blogger won3d said...

Couldn't you synchronously load some bundle metadata that lets you reliably tell the directory which package to expect each resource?

I'm a fan of using hashes as object identity, but I would go for something stronger than CRC. I suppose you could use a big CRC, but some HMAC or just MD5 would probably work better. Also, using strong hashes means you can do some cool caching and distributed stuff pretty easily.

November 26, 2008 at 8:57 PM

Blogger cbloom said...

"Couldn't you synchronously load some bundle metadata that lets you reliably tell the directory which package to expect each resource?
"

That's exactly what I'm trying to do (that metadata is the "Game Dictionary" in my lingo), but correctly maintaining that metadata is not as trivial as it seems due to the issues outlined in the previous post on this topic.

November 28, 2008 at 12:56 AM

Blogger cbloom said...

Yeah, also I guess I should some day look into what hash to use. I'm not actually sure that even CRC32 would be a bad thing since I don't care about global hash collisions, only hash collisions on the exact same file, which has extremely low probability.

Anyway it would be cool to have a stronger hash in my toolkit that's also very fast. The ghetto MD5 and SHA code I've used in the past has been sick slow, but I'm sure it could be made fast.

November 28, 2008 at 1:00 AM

Blogger Assen said...

We found the Windows Crypto API MD5 to be brutally faster than the reference MD5 code we used (3-4x), so on Windows we use that; in any case, it's considerably faster than the actual reading of the file itself.

November 28, 2008 at 1:20 AM

Blogger Sean Barrett said...

There's sha-1 code in stb.h

November 28, 2008 at 12:21 PM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.