groovy - Most efficient way to store big hexadecimal number (md5) in java object -


what efficient way (optimal performance , storage space) store md5 sum of file in java (or groovy) object considering following use-cases:

  1. i need compare thousands of other md5 sums.
  2. i may need store in hsqldb, records can pulled/group by based on md5
  3. may stored in map's keys

i trying avoid storing string string comparisons more costly , take more space. biginteger(string,radix) more efficient? also, datatype should selected if persisting in database?

create class wraps byte[] , provides no mutation. if want use key in map, needs either comparable, or have hash code. byte[] you'll have easier time computing simple hashcode first 32 bits.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -