this module originally created for Roblox. so Pure lua version can be less stable.
local zlib91 = require (" zlib91" )
zlib91.compress(data :string, useSingleQuote :boolean, level :number, strategy :string) -> compressedData :string
useSingleQuote default: false
level default: 6
strategy default: dynamic
local compressedData = zlib91 .compress (" example data" )
zlib91.decompress(compressedData :string, useSingleQuote :boolean) -> decompressedData :string
useSingleQuote default: false
local decompressedData = zlib91 .decompress (compressedData )
"dynamic"
"fixed"
"huffman_only"
Supports luau type autocompletes
(btw, I just personally prefer to use UpperCamelCase with modules for roblox)
local Zlib91 = require (script .zlib91 )
Zlib91.compress(data :string, useSingleQuote? :boolean, level :number, strategy :"dynamic"|"fixed"|"huffman_only") -> compressedData :string
local compressedData = Zlib91 .compress (" example data" )
Zlib91.decompress(compressedData :string, useSingleQuote? :boolean) -> decompressedData :string
local decompressedData = Zlib91 .decompress (compressedData )