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?

tl;dr
Run brew install gnu-tar and use gtar instead of tar

Links:
[1] https://superuser.com/questions/318809/linux-os-x-tar-incompatibility-tarballs-created-on-os-x-give-errors-when-unt