diff --git a/common/hooks/do-pkg/00-gen-pkg.sh b/common/hooks/do-pkg/00-gen-pkg.sh
index b92aaad770..ca445c8fb0 100644
--- a/common/hooks/do-pkg/00-gen-pkg.sh
+++ b/common/hooks/do-pkg/00-gen-pkg.sh
@@ -107,6 +107,7 @@ genpkg() {
 		--source-revisions "${_gitrevs}" \
 		--shlib-provides "${_shprovides}" \
 		--shlib-requires "${_shrequires}" \
+		--compression ${XBPS_PKG_COMPTYPE:=xz} \
 		${_preserve} ${_sourcerevs} ${PKGDESTDIR}
 	rval=$?
 
diff --git a/etc/defaults.conf b/etc/defaults.conf
index c0de576205..d9d29d8a39 100644
--- a/etc/defaults.conf
+++ b/etc/defaults.conf
@@ -73,6 +73,15 @@ XBPS_SUCMD="sudo /bin/sh -c"
 #
 #XBPS_DEBUG_PKGS=yes
 
+# [OPTIONAL]
+# Set the package compression format. Available formats:
+#  - gzip
+#  - bzip2
+#  - xz (default)
+#  - none (available since xbps-0.48)
+#
+#XBPS_PKG_COMPTYPE=none
+
 # [OPTIONAL]
 # Enable or disable global package build options, these options apply
 # to all packages that support the matching options.