Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

198
Vistas
javascript - unzip tar.gz archive in google script

I am trying to unzip the file: [https://wwwinfo.mfcr.cz/ares/ares_vreo_all.tar.gz][1] into google drive folder.

So, I have downloaded the file using google script, but can not properly unzip it. Could you, please, help me with it?

Thank you in advance!

Update: Here is my code

function updateDB() {
  var url = 'https://wwwinfo.mfcr.cz/ares/ares_vreo_all.tar.gz';
  var blob = UrlFetchApp.fetch(url).getBlob();
  var folder = DriveApp.getFolderById('fileid');
  var archive = folder.createFile(blob);
  unzip(archive);
}

function unzip(archive){
  var zipblob = archive.getBlob();
  var uncompressed1 = Utilities.ungzip(zipblob);
}

So I receive the following error:

Exception: Could not decompress gzip.

I guess it does not decompress normally, that is why I am asking if you would know different way [1]: https://wwwinfo.mfcr.cz/ares/ares_vreo_all.tar.gz

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can use the Utilities Class to unzip your File.

To unzip the gzip you have to call the ungzip() method:

var textBlob = Utilities.newBlob("Some text to compress using gzip compression");

// Create the compressed blob.
var gzipBlob = Utilities.gzip(textBlob, "text.gz");

// Uncompress the data.
var uncompressedBlob = Utilities.ungzip(gzipBlob);

That's the example provided in the official documentation.

You can also take a look at the answer given to this question that also explains how to use the Utilities Class in combination with Google Drive.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda