util.Decompress
Description
Decompresses the given string using LZMA algorithm. Used to decompress strings previously compressed with util.Compress.
When reading user data, always try to specify
maxSize argument, otherwise the server can be decompression bombed with bad data that will fill up all Lua memoryThis function expects the compressed input data to have the uncompressed size of the data prepended to it as an 8-byte little-endian integer. Source
If your compressed input data was compressed by util.Compress, you don't need to worry about this - the uncompressed size of the data is already prepended to its output.
However, if your compressed data was produced using standard tools outside of Garry's Mod, you will need to manually prepend the length of the uncompressed data to its compressed form as an 8-byte little endian integer.
Arguments
Returns
Page views: 18,190
Updated: This Month
Updated: This Month
Garry's Mod
Rust
Steamworks
Wiki Help