3

I wanted to know if it is possible to compress files within my Google Drive. Is it possibly to highly compress the files like 7zip does?

Edit I meant without downloading the files onto the computer and just compressing them directly in the drive itself. Is there a possible way?

rahulgarg12342
  • 155
  • 1
  • 10

5 Answers5

3

There is an efficient, fast, simple but indirect method of compressing the large files into Google Drive using Google Colaboratory.

For example, Let us assume there is a file named data.txt in your Google Drive, the task is to 7zip (compress) it to data.7z.

Google Drive:

My Drive

data.txt

Steps:

  1. Open Google Colab (it's free), Create a New Notebook.
  2. Mount Google drive into Google Colab by running the following command lines:

    from google.colab import drive drive.mount('/content/gdrive')

    Note: Now on the left side (Files) you can observe your My Drive inside gdrive and folder data.txt inside My Drive.

  3. Change the current directory by following command run.

    cd gdrive/My Drive/

  4. Compress files/folder: data.txt to data.7z using the following command run.

    !7z a data.7z data.txt

Now check your My Drive in Google Drive, you can find a data.7z file.

For more insights check my other answer on "How to compress files in google drive?": Answer

Bharat Giddwani
  • 281
  • 3
  • 5
0

There is no internal way to zip a file in place.

You could however run a service that does this, for example, using Google App Engine with Apps Script. This would mean the file doesn't need to be sent from Drive to the Client and back again, but from one server to another, which should be more performant and friendly on the clients bandwidth.

Dan McGrath
  • 41,220
  • 11
  • 99
  • 130
0

I think of a way:

There are some online file conversion utilities, (you can find through Google..) that help to convert a file to tar.bz2 or zip etc.. formats.

If that online utility has integration with Google Drive / Dropbox, you should be able to convert the compressed file to cloud.

Another way is to use a cloud service. Some free services give you up to 256 MB RAM, enough to run a customized compression utility in a container, and then send it to Google Drive using their APIs. In this method you will have control over the process, however it takes some time to deploy the utility.

0

Yes there is,

  1. Go to here
  2. Tap on the arrow
  3. Select Drive
  4. Sign in to your google account
  5. Select what ever you want
  6. Then choose 7zip
sudo97
  • 904
  • 2
  • 11
  • 22
-2

No I don't think there is a way, sorry.

user3443378
  • 9
  • 1
  • 1
  • 3