Gunzip using bsdtar (Mac)

When I create a tgz file using

tar -cvzf folder.tgz folder

on my Mac (bsdtar 2.8.3 - libarchive 2.8.3),

file folder.tgz

gives me folder.tgz: gzip compressed data, but when I run file on the very same tgz file on my Google Cloud instance, I get folder.tgz: POSIX tar archive. As a result, untar_data complains like so: ReadError: not a gzip file

Any ideas?

Run brew install gnu-tar and use gtar instead of tar