Compress test data with zstd instead of xz

The result is a moderate size increase (~8%), but also tremendously
faster decompression, which results in a modest but noticeable
improvement in overall build time.

The real basis for the change is the relative upstream healths of the
two projects.
This commit is contained in:
Benjamin A. Beasley 2024-04-02 00:20:13 -04:00
commit d772e286e7
5 changed files with 9 additions and 6 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@
/pyMapVBVD-test-data.tar.xz
/pyMapVBVD-0.5.6.tar.gz
/pyMapVBVD-0.5.7.tar.gz
/pyMapVBVD-test-data.tar.zst

View file

@ -11,7 +11,7 @@ Usage: $1 VERSION
Generate a source archive containing the test data files for pyMapVBVD that are
tracked in git LFS and are not included in the default source archive. The
result will be named pyMapVBVD-test-data.tar.xz and will be written
result will be named pyMapVBVD-test-data.tar.zst and will be written
into the current working directory.
The script attempts to produce a reproducible archive to avoid uploading
@ -46,7 +46,7 @@ GITDIR="$(echo "${FORGEURL}" | sed -r 's@.*/@@')"
#SOURCE0="${FORGEURL}/archive/${VERSION}/pdfminer.six-${VERSION}.tar.gz"
#TARNAME="$(basename "${SOURCE0}")"
TARDIR="pyMapVBVD-${VERSION}"
NEWTAR='pyMapVBVD-test-data.tar.xz'
NEWTAR='pyMapVBVD-test-data.tar.zst'
SAVEDIR="${PWD}"
XDIR="$(mktemp -d)"
@ -79,7 +79,7 @@ TZ=UTC LC_ALL=C tar \
--pax-option='delete=atime,delete=ctime' \
--clamp-mtime --mtime='@0' \
. |
xz -9e > "${XDIR}/${NEWTAR}"
zstdmt --ultra -22 > "${XDIR}/${NEWTAR}"
cd "${SAVEDIR}"
mv -v "${XDIR}/${NEWTAR}" .

View file

@ -4,4 +4,6 @@
addFilter(r" spelling-error \('(dat|twix)',")
# This source cannot be a URL because we must use a script to download its
# contents from git-lfs.
addFilter(r" invalid-url Source1: pyMapVBVD-test-data\.tar\.")
addFilter(r" invalid-url Source[0-9]+: pyMapVBVD-test-data\.tar\.zst$")
# Bogus; it is a perfectly fine zstandard file.
addFilter(r" inconsistent-file-extension pyMapVBVD-test-data\.tar\.zst$")

View file

@ -11,7 +11,7 @@ License: MIT AND Unlicense
URL: https://github.com/wtclarke/pymapvbvd
Source0: %{pypi_source pyMapVBVD}
# Generated with Source2: ./get_test_data.sh %%{version}
Source1: pyMapVBVD-test-data.tar.xz
Source1: pyMapVBVD-test-data.tar.zst
Source2: get_test_data.sh
BuildArch: noarch

View file

@ -1,2 +1,2 @@
SHA512 (pyMapVBVD-0.5.7.tar.gz) = 0efd2d12ec48ae7f825095edf440d14064cf0f1690ab7dee63f247a923d359f633d057086a1d3defd2bd1606dbba0d1fabe2f6360f3658d04c78f347b61771ce
SHA512 (pyMapVBVD-test-data.tar.xz) = e082c5c296c67d62dbfaa631a8507427ac74375902b2038bf5de58aed39f3ce71dd013318cb262d66bc3ab7bb0c560ea7228b52da09ed7361a0396b16e71b974
SHA512 (pyMapVBVD-test-data.tar.zst) = 1b8106a2f0cde214eb545e09803ec042e7b40c93d9fbfcbe4d2b189b8d7146dc3ba4e63b53f9084bbee289e0bdcdd4f570453642b5553da9d70bdcdaf2ecd426