Background:
I am using Clojure, on Java 7.0 on Ubuntu Linux 12.10, with an Ext4 file system.
Problem:
I have an arbitrary Clojure string. I would like to encode it into a valid filename.
Question:
What is the optimal way / what is a good builtin for doing this?
Note:
The encoded file name does not have to be human readable. I just need to be able to recover the original string from the filename.
EDIT:
Although if strings that are valid names gets mapped to something that is human readbale (and close to it's original value, that would be nice too.)
Thanks!
EDIT:
encode: takes arbitrary string as input; creates valid filename as output
decode: takes file name from encode, recovers original string