1
votes

I do upload a zipped file to Google Storage Bucket. The file is huge so I do not want to upload it in uncompressed format. I am trying to find out if I can unzip this file directly in google bucket.

I read about cloud functions and using that to unzip any file uploaded. But I would prefer having control on the file to be unzipped via Java Code. Has anyone tried this before?

Thanks in Advance!

2
If I understand correctly, you would like to unzip the file directly in GCS. You wouldn't like to use Cloud Functions because in that way, you will download the file, unzip and then upload it again. Can you confirm that?ericcco
@eespinola Yes I want to unzip the file directly in GCSNikita Kotak
GCS does not perform processing on files, it stores them. If you need to process (unzip) the file, that work has to be done somewhere else: in a Cloud Function, a VM, etc.Travis Webb

2 Answers

1
votes

You can gzip-compress the file when uploading to Google Cloud Storage so that whenever the file is downloaded, it is automatically decompressed before being sent back, see this documentation for more information.

0
votes

Found an answer here : How do I unzip a .zip file in google cloud storage?

Dataflow API can be used for this purpose to decompress the file.