HolyLib Wiki

util

util

This library is part of gmod but were extenting it.
See: https://wiki.facepunch.com/gmod/util

Methods

util.AsyncCompress( string data, number level = 5, number dictSize = 65536, function callback )
Compresses the given data async. Instead of copying the given data, we keep a reference to it.
So don't modify it, while were compressing it!
util.AsyncDecompress( string data, function callback, number ratio = 0.98 )
Decompresses the given data async. Instead of copying the given data, we keep a reference to it.
So don't modify it, while were decompressing it!
util.CompressLZ4( string data, number accelerationLevel = 1 )
Compresses the given data using LZ4
Decompresses the given data using LZ4
string util.FancyTableToJSON( table tbl, boolean pretty, boolean ignorecycle = false )
It's util.TableToJSON but faster and it will turn numbers into integers if they fit as one.