Taleo stores resume files or resume attachments in base64gz format at rest. The WriteBase64StringToBinary peoplecode file function will do only half of the job as it will not take care of uncompressing the gz format.
One option could be to use the peoplecode WriteBase64StringToBinary to get the decoded but compressed string and then use another 3rd party command line or java command line to uncompress the file.
Following method shows performing the decryption using delivered java classes.
Local JavaObject &gzipIn, &filebuffer, &decoder, &bytes_decoded;
Local string &gzFilePath;
Local number &byteCount;
try
/* some location to write the decoded but compressed file */
&decoder = GetJavaClass("java.util.Base64").getDecoder();
&bytes_decoded = &decoder.decode(&encoded_string);
&fileOutgz = CreateJavaObject("java.io.FileOutputStream", &gzFilePath);
&fileOutgz.write(&bytes_decoded);
&fileOutgz.flush();
&fileOutgz.close();
&fileIn = CreateJavaObject("java.io.FileInputStream", &gzFilePath);
&fileOut = CreateJavaObject("java.io.FileOutputStream", &resumeFilePath);
&gzipIn = CreateJavaObject("java.util.zip.GZIPInputStream", &fileIn);
/* Use a byte array to read chunks of decompressed data */
&filebuffer = CreateJavaArray("byte[]", 1024);
/* Read decompressed bytes until the end of the stream */
&byteCount = &gzipIn.read(&filebuffer);
While &byteCount > 0
/* Process the uncompressed bytes, write to file */
&fileOut.write(&filebuffer, 0, &byteCount);
&byteCount = &gzipIn.read(&filebuffer);
End-While;
/* Close the input streams to release resources */
&gzipIn.close();
&fileOut.close();
&fileIn.close();
&gzFile = CreateJavaObject("java.io.File", &gzFilePath);
If &gzFile.exists() Then
&gzFile.delete();
End-If;
/* handle error conditions here */
end-try;