Why don't you take a look at the function hashcode()for String and just accept it instead of using long values?
Btw. if there was a way to create a unique identifier for each line, then you would find a compression algorithm that could pack each line in 8 bytes (this is not possible by definition).
source
share