Repository navigation
Conversation
GitHub rejects files over 100 MB. A data file may now be stored as <name>.gz; info.txt, metadata.csv and the release zips keep using the plain name and contents. scripts/datafiles.py resolves and reads either form for sanitychecks.py, compute_metadata.py and zipall.py.
fsargent
force-pushed
the
preflib-gzip-support
branch
from
November 22, 2026 12:38
43b4067 to
248d17c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub rejects files over 100 MB, and PrefLib's largest file today is 79 MB. The 2025 Australian Senate profiles for NSW, Victoria and Queensland are 116, 106 and 96 MB as plain SOI, but only 6–7 MB gzipped. This PR lets a data file over 50 MB be stored as
<name>.gzwhile everything else keeps using its plain name and contents:info.txtlists00080-00000001.soi;metadata.csvgives the MD5 of the plain file, so change detection is unaffected;scripts/zipall.pywrites the plain.soiinto the release zip, keeping the timestamp, so downloads and the website see no difference.A new
scripts/datafiles.pyresolves either form and parses compressed files under their plain name (preflibtools reads the type from the extension).sanitychecks.py,compute_metadata.pyandzipall.pyuse it. Files without a.gztake the same code paths as before, apart from a 1 MB read buffer for the MD5. The README gets a short "Large data files" section.Tested on a scratch dataset with one plain and one compressed SOI file:
sanitychecks.py --escalate-warningspasses;compute_metadata.pygives the compressed file the plain file's MD5 and the same properties;zipall.pywrites the plain file under its plain name, byte-identical to the original.The Senate dataset PR depends on this one.