Well, is trans a string variable, a file with characters, a char pointer, etc?
Here's a quick decode example from an encoded file to a decoded file. Decoding is just subtracting one from the character, which had one added when encoded. The decoding and writing to a file is one operation here.
fs.put may be reading in one character at a time, but you may be trying to give it a string. You may need a loop or different variable type for trans.
while (fileIn2.get(ch)) // Decrypt data
fileOut2.put(ch - 1);