HolyLib Wiki

gmoddatapack

gmoddatapack

This module changes how GMod's data pack compresses files by compressing them once set instead of delaying the compression until a person joins to avoid having a lag spike and increased loading times when initially joining.
This is not that useful by itself, though when you're developing and do lots of map changes or restarts this can save a bit of time.
Additionally using the holylib_gmoddatapack_removeserverif and holylib_gmoddatapack_removecomments convars, it can strip files reducing size further. Supports: Linux32 | Linux64 | Windows32 | Windows64

Recently Added

This was recently added in version (0.8 - DEV).

Methods

number gmoddatapack.GetCompressedSize( string fileName )
Returns the compressed size of the code, this is the size that is sent to the client.
string gmoddatapack.GetStoredCode( string fileName )
Returns the processed code that is stored, this will be the code that is sent to clients.
gmoddatapack.MarkAsTokenizeThread()
Marks this lua state to be the one called for the HolyLib:OnTokenizeContent hook.
string gmoddatapack.StripCode( string code, boolean removeServerCode = (ConVar Value), boolean removeComments = (ConVar Value), function tokenizeContent = nil )
Strips the code based off the settings and returns the new stripped code.