write out meshed models using gzip compression (files will NOT have the .gz

extension, but the unix file command (and peering at the file when you know
what to look for) verifies that they are gzip files. This should save a little
space (files compress by 40-80%)
This commit is contained in:
Bill Currie 2000-12-15 05:57:44 +00:00
parent b98e19fdd6
commit b6749ecc0f
2 changed files with 6 additions and 1 deletions

View file

@ -353,7 +353,7 @@ GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr)
// save out the cached version // save out the cached version
// //
snprintf (fullpath, sizeof (fullpath), "%s/%s", com_gamedir, cache); snprintf (fullpath, sizeof (fullpath), "%s/%s", com_gamedir, cache);
f = Qopen (fullpath, "wb"); f = Qopen (fullpath, "wbz9");
if (!f) { if (!f) {
COM_CreatePath (fullpath); COM_CreatePath (fullpath);
f = Qopen (fullpath, "wb"); f = Qopen (fullpath, "wb");

View file

@ -125,6 +125,11 @@ Qopen (const char *path, const char *mode)
zip = 1; zip = 1;
continue; continue;
} }
#ifndef HAVE_ZLIB
if (strchr ("0123456789fh", *mode)) {
continue;
}
#endif
*p++ = *mode; *p++ = *mode;
} }
*p = 0; *p = 0;