Hey guys, I had a question about converting a list...
# announcements
v
Hey guys, I had a question about converting a list of strings into a Gzipped file that I can write to S3 directly
Copy code
val lines: MutableList<String> = mutableListOf()
// Read in another stream and write a chunk of lines to the above list

val stringToWrite = lines.join { "" }
Now here is where I need help, should I be using
stringToWrite.byteInputStream()
or
stringToWrite.toByteArrray()
? I know that I have to use a GZipOutputStream somewhere but I needed a bit of help lining up all the pipes so that I can give it to the Amazon S3 client. Any ideas? Thanks