On 11-09-16 09:48 AM, Thomas Gries wrote:
Am 16.09.2011 11:24, schrieb Roan Kattouw:
For some applications, I use the technique of
representing the 128 bit
of md5 or other checksums
as base-62 character strings
instead of hexadecimal (base-16) strings.
MediaWiki already uses a similar technique, storing SHA-1 hashes of
images in base 36.
Was there a certain reason to chose base 36 ?
Why not recoding to base 62 and saving 3 bytes per checksum ?
base 16 = CHAR(32) md5 sum in hexadecimal
base 36 = CHAR(25)
base 62 = CHAR(22)
using base 62 (upper and lower ASCII letters and digits) would save 3
bytes over base 36.
if my calculator works correctly ;-)
If we're picking apart checksum sizes in
database storage. Why not just
go all the way and store the binary data as binary with a BINARY(16)
16, 36, 62... what happened to base 64 anyways? php even has native code
for that.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [
http://daniel.friesen.name]