### LibDeflate Initialization and Basic Usage Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/examples/example.lua.html Demonstrates how to initialize the library for either WoW addon environments or standalone Lua, followed by basic raw deflate compression and decompression. ```lua local LibDeflate if LibStub then -- You are using LibDeflate as WoW addon LibDeflate = LibStub:GetLibrary("LibDeflate") else -- You are using LibDeflate as Lua library. -- Setup the path to locate LibDeflate.lua, -- if 'require("LibDeflate")' fails, for example: -- package.path = ("?.lua;../?.lua;")..(package.path or "") LibDeflate = require("LibDeflate") end local example_input = "12123123412345123456123456712345678123456789" -- Compress using raw deflate format local compress_deflate = LibDeflate:CompressDeflate(example_input) -- decompress local decompress_deflate = LibDeflate:DecompressDeflate(compress_deflate) -- Check if the first return value of DecompressXXXX is non-nil to know if the -- decompression succeeds. if decompress_deflate == nil then error("Decompression fails.") else -- Decompression succeeds. assert(example_input == decompress_deflate) end ``` -------------------------------- ### Create and Use a Codec Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Initializes a codec to map specific characters and demonstrates the encode/decode cycle. ```lua local codec = LibDeflate:CreateCodec("\000\001", "\002", "\003") local encoded = codec:Encode(SOME_STRING) -- "encoded" does not contain "\000" or "\001" local decoded = codec:Decode(encoded) -- assert(decoded == SOME_STRING) ``` -------------------------------- ### Zlib Compression and Compression Levels Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/examples/example.lua.html Demonstrates Zlib format usage and how to specify compression levels for the deflate algorithm. ```lua -- Compress and decompress using zlib format local compress_zlib = LibDeflate:CompressZlib(example_input) local decompress_zlib = LibDeflate:DecompressZlib(compress_zlib) assert(decompress_zlib == example_input) -- Control the compression level -- NOTE: High compression level does not make a difference here, -- because the input data is very small local compress_deflate_with_level = LibDeflate:CompressDeflate(example_input , {level = 9}) local decompress_deflate_with_level = LibDeflate:DecompressDeflate( compress_deflate_with_level) assert(decompress_deflate_with_level == example_input) ``` -------------------------------- ### Using Dictionaries with LibDeflate Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/examples/example.lua.html Illustrates how to create and use a preset dictionary for compression. Both compressor and decompressor must use the exact same dictionary. ```lua -- Compress with a preset dictionary local dict_str = "121231234" -- example preset dictionary string. -- print(LibDeflate:Adler32(dict_str), #dict_str) -- 9 147325380 -- hardcode the print result above, the ensure it is not modified -- accidenttaly during the program development. -- -- WARNING: The compressor and decompressor must use the same dictionary. -- You should be aware of this when tranmitting compressed data over the -- internet. local dict = LibDeflate:CreateDictionary(dict_str, 9, 147325380) -- Using the dictionary with raw deflate format local compress_deflate_with_dict = LibDeflate:CompressDeflateWithDict( example_input, dict) assert(#compress_deflate_with_dict < #compress_deflate) local decompress_deflate_with_dict = LibDeflate:DecompressDeflateWithDict( compress_deflate_with_dict, dict) assert(decompress_deflate_with_dict == example_input) ``` -------------------------------- ### Serialize and Transmit Data with LibSerialize Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibSerialize/README.md Demonstrates how to serialize, compress, and transmit data using LibSerialize and LibDeflate, as well as an alternative method without compression using a custom codec. ```lua -- Dependencies: AceAddon-3.0, AceComm-3.0, LibSerialize, LibDeflate MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceComm-3.0") local LibSerialize = LibStub("LibSerialize") local LibDeflate = LibStub("LibDeflate") function MyAddon:OnEnable() self:RegisterComm("MyPrefix") end -- With compression (recommended): function MyAddon:Transmit(data) local serialized = LibSerialize:Serialize(data) local compressed = LibDeflate:CompressDeflate(serialized) local encoded = LibDeflate:EncodeForWoWAddonChannel(compressed) self:SendCommMessage("MyPrefix", encoded, "WHISPER", UnitName("player")) end function MyAddon:OnCommReceived(prefix, payload, distribution, sender) local decoded = LibDeflate:DecodeForWoWAddonChannel(payload) if not decoded then return end local decompressed = LibDeflate:DecompressDeflate(decoded) if not decompressed then return end local success, data = LibSerialize:Deserialize(decompressed) if not success then return end -- Handle `data` end -- Without compression (custom codec): MyAddon._codec = LibDeflate:CreateCodec("\000", "\255", "") function MyAddon:Transmit(data) local serialized = LibSerialize:Serialize(data) local encoded = self._codec:Encode(serialized) self:SendCommMessage("MyPrefix", encoded, "WHISPER", UnitName("player")) end function MyAddon:OnCommReceived(prefix, payload, distribution, sender) local decoded = self._codec:Decode(payload) if not decoded then return end local success, data = LibSerialize:Deserialize(decoded) if not success then return end -- Handle `data` end ``` -------------------------------- ### Create a Preset Dictionary Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Initializes a dictionary for compression. Hardcode the length and Adler-32 checksum to ensure data integrity during development. ```lua local dict_str = "1234567890" -- print(dict_str:len(), LibDeflate:Adler32(dict_str)) -- Hardcode the print result below to verify it to avoid acciently -- modification of 'str' during the program development. -- string length: 10, Adler-32: 187433486, -- Don't calculate string length and its Adler-32 at run-time. local dict = LibDeflate:CreateDictionary(dict_str, 10, 187433486) ``` -------------------------------- ### Initialize LibDeflate Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/topics/readme.md.html Detects the environment to load the library via LibStub for World of Warcraft or require for standard Lua. ```lua local LibDeflate if LibStub then -- You are using LibDeflate as WoW addon LibDeflate = LibStub:GetLibrary("LibDeflate") else LibDeflate = require("LibDeflate") end ``` -------------------------------- ### WoW Addon Channel and Printable Encoding Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/examples/example.lua.html Shows how to encode compressed data for safe transmission over WoW addon channels and how to convert binary compressed data into a printable format. ```lua -- If it is to transmit through WoW addon channel, -- compressed data must be encoded so NULL ("\000") is not transmitted. local data_to_trasmit_WoW_addon = LibDeflate:EncodeForWoWAddonChannel( compress_deflate) -- When the receiver gets the data, decoded it first. local data_decoded_WoW_addon = LibDeflate:DecodeForWoWAddonChannel( data_to_trasmit_WoW_addon) -- Then decomrpess it assert(LibDeflate:DecompressDeflate(data_decoded_WoW_addon) == example_input) -- The compressed output is not printable. EncodeForPrint will convert to -- a printable format, in case you want to export to the user to -- copy and paste. This encoding will make the data 25% bigger. local printable_compressed = LibDeflate:EncodeForPrint(compress_deflate) -- DecodeForPrint to convert back. -- DecodeForPrint will remove prefixed and trailing control or space characters -- in the string before decode it. assert(LibDeflate:DecodeForPrint(printable_compressed) == compress_deflate) ``` -------------------------------- ### Serialize and Deserialize Data Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibSerialize/README.md Demonstrates basic serialization of tables with variadic arguments and arbitrary key types. ```lua local t = { "test", [false] = {} } t[ t[false] ] = "hello" local serialized = LibSerialize:Serialize(t, "extra") local success, tab, str = LibSerialize:Deserialize(serialized) assert(success) assert(tab[1] == "test") assert(tab[ tab[false] ] == "hello") assert(str == "extra") ``` -------------------------------- ### Compress and Decompress Data Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/topics/readme.md.html Demonstrates basic compression using the raw deflate format and verifying the result through decompression. ```lua local example_input = "12123123412345123456123456712345678123456789" --- Compress using raw deflate format local compress_deflate = LibDeflate:CompressDeflate(example_input) -- decompress local decompress_deflate = LibDeflate:DecompressDeflate(compress_deflate) -- Check if the first return value of DecompressXXXX is non-nil to know if the -- decompression succeeds. if decompress_deflate == nil then error("Decompression fails.") else -- Decompression succeeds. assert(example_input == decompress_deflate) end ``` -------------------------------- ### LibDeflate:CreateDictionary Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Creates a preset dictionary for compression and decompression. It is recommended to run this once and ensure the same dictionary is used for both operations. ```APIDOC ## LibDeflate:CreateDictionary(str, strlen, adler32) ### Description Creates a preset dictionary for compression and decompression. The dictionary string must be between 1 and 32768 bytes. ### Parameters - **str** (string) - The string used as the preset dictionary. - **strlen** (integer) - The length of 'str'. - **adler32** (integer) - The Adler-32 checksum of 'str'. ### Returns - **table** - The dictionary object used for compression and decompression. ### Raises - Error if 'strlen' does not match the length of 'str', or if 'adler32' does not match the Adler-32 checksum of 'str'. ``` -------------------------------- ### Apply Serialization Filters Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibSerialize/README.md Demonstrates using global and metatable-specific filters to control which keys are serialized. ```lua local t = { a = 1, b = print, c = 3 } local nested = { a = 1, b = print, c = 3 } t.nested = nested setmetatable(nested, { __LibSerialize = { filter = function(t, k, v) return k ~= "c" end }}) local opts = { filter = function(t, k, v) return LibSerialize:IsSerializableType(k, v) end } local serialized = LibSerialize:SerializeEx(opts, t) local success, tab = LibSerialize:Deserialize(serialized) assert(success) assert(tab.a == 1) assert(tab.b == nil) assert(tab.c == 3) assert(tab.nested.a == 1) assert(tab.nested.b == nil) assert(tab.nested.c == nil) ``` -------------------------------- ### LibSerialize:Serialize Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibSerialize/README.md Serializes a variable number of values into a string using default options. ```APIDOC ## LibSerialize:Serialize(...) ### Description Serializes a variable number of serializable values into a string using default options. This method will raise a Lua error if the input cannot be serialized. ### Parameters - **...** (any) - Required - A variable number of serializable values to be serialized. ### Returns - **result** (string) - The serialized representation of the input values. ``` -------------------------------- ### LibDeflate:EncodeForWoWAddonChannel Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Encodes a string for transmission in World of Warcraft addon channels. ```APIDOC ## LibDeflate:EncodeForWoWAddonChannel(str) ### Description Encode the string to make it ready to be transmitted in World of Warcraft addon channel. The encoded string is guaranteed to contain no NULL characters. ### Parameters - **str** (string) - The string to be encoded. ### Returns - (string) The encoded string. ``` -------------------------------- ### LibSerialize:Deserialize Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibSerialize/README.md Deserializes a string back into Lua values, returning a success status. ```APIDOC ## LibSerialize:Deserialize(input) ### Description Deserializes a string previously returned from LibSerialize:Serialize(). This method catches Lua errors encountered during deserialization. ### Parameters - **input** (string) - Required - The serialized string to deserialize. ### Returns - **success** (boolean) - Indicates if the deserialization was successful. - **...** (any) - The deserialized values, or a string containing the encountered Lua error. ``` -------------------------------- ### LibSerialize:SerializeEx Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibSerialize/README.md Serializes a variable number of values into a string using specified options. ```APIDOC ## LibSerialize:SerializeEx(opts, ...) ### Description Serializes a variable number of serializable values into a string based on the provided options. ### Parameters - **opts** (table) - Required - Options for the serialization process. - **...** (any) - Required - A variable number of serializable values to be serialized. ### Returns - **result** (string) - The serialized representation of the input values. ``` -------------------------------- ### LibDeflate CLI Usage Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html The LibDeflate command-line tool allows users to perform compression or decompression operations on input files. ```APIDOC ## CLI Usage ### Syntax `lua LibDeflate.lua [OPTION] [INPUT] [OUTPUT]` ### Options - `-0`: Store only (no compression). - `-1`: Fastest compression. - `-9`: Slowest and best compression. - `-d`: Perform decompression instead of compression. - `--dict `: Specify the file containing the preset dictionary. - `-h`: Display help information. - `--strategy `: Specify a special compression strategy. - `-v`: Print version and copyright information. - `--zlib`: Use zlib format instead of raw deflate. ``` -------------------------------- ### compression_configs Table Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Configuration table used to define compression parameters. ```APIDOC ## compression_configs ### Fields - **level** (number): Compression level ranging from 0 to 9. 0 is no compression, 9 is the slowest but best compression. Use nil for default. - **strategy** (string): Compression strategy. Options include "fixed" (fixed deflate block), "dynamic" (dynamic block), or "huffman_only" (no LZ77 compression). ``` -------------------------------- ### Handle Recursive Table References Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibSerialize/README.md Illustrates how the library maintains integrity when tables contain recursive references. ```lua local t = { a = 1 } t.t = t t[t] = "test" local serialized = LibSerialize:Serialize(t) local success, tab = LibSerialize:Deserialize(serialized) assert(success) assert(tab.t.t.t.t.t.t.a == 1) assert(tab[tab.t] == "test") ``` -------------------------------- ### LibDeflate:EncodeForWoWChatChannel Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Encodes a string for transmission in World of Warcraft chat channels. ```APIDOC ## LibDeflate:EncodeForWoWChatChannel(str) ### Description Encode the string to make it ready to be transmitted in World of Warcraft chat channel. ### Parameters - **str** (string) - The string to be encoded. ### Returns - (string) The encoded string. ``` -------------------------------- ### Compress and Decompress with Dictionary in Lua Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/examples/example.lua.html Uses a dictionary to compress data with a specific zlib level and verifies the result by decompressing it back to the original input. ```lua -- Using the dictionary with zlib format, specifying compression level local compress_zlib_with_dict = LibDeflate:CompressZlibWithDict( example_input, dict, {level = 9}) assert(#compress_zlib_with_dict < #compress_zlib) local decompress_zlib_with_dict = LibDeflate:DecompressZlibWithDict( compress_zlib_with_dict, dict) assert(decompress_zlib_with_dict == example_input) ``` -------------------------------- ### LibDeflate:CompressZlibWithDict Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Compresses data using the zlib format with a preset dictionary. ```APIDOC ## LibDeflate:CompressZlibWithDict(str, dictionary, configs) ### Description Compresses the provided string using the zlib format with a preset dictionary. ### Parameters - **str** (string) - The data to be compressed. - **dictionary** (table) - A preset dictionary produced by LibDeflate:CreateDictionary(). - **configs** (table/nil) - Optional configuration table to control compression. ### Returns 1. **compressed_data** (string) - The compressed data. 2. **padding_bits** (integer) - The number of bits padded at the end of output (always 0). ``` -------------------------------- ### Transmit Data via WoW Addon Channel Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/topics/readme.md.html Encodes compressed data to be safe for transmission through World of Warcraft addon channels by removing NULL characters. ```lua -- To transmit through WoW addon channel, data must be encoded so NULL ("\000") -- is not in the data. local data_to_trasmit_WoW_addon = LibDeflate:EncodeForWoWAddonChannel( compress_deflate) -- When the receiver gets the data, decoded it first. local data_decoded_WoW_addon = LibDeflate:DecodeForWoWAddonChannel( data_to_trasmit_WoW_addon) -- Then decomrpess it local decompress_deflate = LibDeflate:DecompressDeflate(data_decoded_WoW_addon) assert(decompress_deflate == example_input) ``` -------------------------------- ### Configure Serialization Error Handling Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibSerialize/README.md Shows how to disable errors for unserializable types to silently ignore them during serialization. ```lua local serialized = LibSerialize:SerializeEx( { errorOnUnserializableType = false }, print, { a = 1, b = print }) local success, fn, tab = LibSerialize:Deserialize(serialized) assert(success) assert(fn == nil) assert(tab.a == 1) assert(tab.b == nil) ``` -------------------------------- ### LibDeflate:CompressDeflateWithDict Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Compresses data using the raw deflate format with a preset dictionary. ```APIDOC ## LibDeflate:CompressDeflateWithDict(str, dictionary, configs) ### Description Compresses the provided string using the raw deflate format with a preset dictionary. ### Parameters - **str** (string) - The data to be compressed. - **dictionary** (table) - The preset dictionary produced by LibDeflate:CreateDictionary. - **configs** (table/nil) - Optional configuration table to control compression. ### Returns 1. **compressed_data** (string) - The compressed data. 2. **padding_bits** (integer) - The number of bits padded at the end of output (0 <= bits < 8). ``` -------------------------------- ### LibDeflate:CompressZlib Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Compresses data using the zlib format. ```APIDOC ## LibDeflate:CompressZlib(str, configs) ### Description Compresses the provided string using the zlib format. ### Parameters - **str** (string) - The data to be compressed. - **configs** (table/nil) - Optional configuration table to control compression. ### Returns 1. **compressed_data** (string) - The compressed data. 2. **padding_bits** (integer) - The number of bits padded at the end of output (always 0). ``` -------------------------------- ### LibDeflate:DecompressZlibWithDict Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Decompresses zlib compressed data using a preset dictionary. ```APIDOC ## LibDeflate:DecompressZlibWithDict(str, dictionary) ### Description Decompress a zlib compressed data with a preset dictionary. ### Parameters - **str** (string) - The data to be decompressed. - **dictionary** (table) - The preset dictionary used during compression. ### Returns 1. (string/nil) The decompressed data if successful, otherwise nil. 2. (integer) The number of unprocessed bytes in the input data if successful. ``` -------------------------------- ### LibDeflate:CreateCodec Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Creates a custom codec for encoding and decoding strings to avoid specific byte sequences. ```APIDOC ## LibDeflate:CreateCodec(reserved_chars, escape_chars, map_chars) ### Description Creates a custom codec used to convert an input string to ensure it does not contain specific bytes. Returns a table with Encode and Decode methods. ### Parameters - **reserved_chars** (string) - Characters to be excluded from encoded data. - **escape_chars** (string) - Escape character(s) used for encoding. - **map_chars** (string) - Characters to map reserved_chars to. ### Returns 1. **codec** (table/nil) - The codec table containing Encode(str) and Decode(str) methods, or nil if creation fails. 2. **error** (nil/string) - Error description if codec creation fails. ``` -------------------------------- ### LibDeflate:DecompressZlib Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Decompresses zlib compressed data. ```APIDOC ## LibDeflate:DecompressZlib(str) ### Description Decompress a zlib compressed data. ### Parameters - **str** (string) - The data to be decompressed. ### Returns 1. (string/nil) The decompressed data if successful, otherwise nil. 2. (integer) The number of unprocessed bytes in the input data if successful. ``` -------------------------------- ### LibSerialize:DeserializeValue Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibSerialize/README.md Deserializes a string back into Lua values directly. ```APIDOC ## LibSerialize:DeserializeValue(input) ### Description Deserializes a string previously returned from LibSerialize:Serialize(). Unlike Deserialize(), this method does not catch Lua errors. ### Parameters - **input** (string) - Required - The serialized string to deserialize. ### Returns - **...** (any) - The deserialized values. ``` -------------------------------- ### LibDeflate:DecompressDeflateWithDict Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Decompresses raw deflate compressed data using a preset dictionary. ```APIDOC ## LibDeflate:DecompressDeflateWithDict(str, dictionary) ### Description Decompress a raw deflate compressed data with a preset dictionary. Decompression and compression must use the same dictionary. ### Parameters - **str** (string) - The data to be decompressed. - **dictionary** (table) - The preset dictionary used during compression. ### Returns 1. (string/nil) The decompressed data if successful, otherwise nil. 2. (integer) The number of unprocessed bytes in the input data if successful. ``` -------------------------------- ### LibDeflate:EncodeForPrint Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Encodes a string into a printable ASCII format. ```APIDOC ## LibDeflate:EncodeForPrint(str) ### Description Encode the string to make it printable using 64 printable ASCII characters. The resulting string will be 25% larger than the original. ### Parameters - **str** (string) - The string to be encoded. ### Returns - (string) The encoded string. ``` -------------------------------- ### Encode Data for Printable Format Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/topics/readme.md.html Converts compressed data into a printable format for export, increasing size by approximately 25%. ```lua -- The compressed output is not printable. EncodeForPrint will convert to -- a printable format, in case you want to export to the user to -- copy and paste. This encoding will make the data 25% bigger. local printable_compressed = LibDeflate:EncodeForPrint(compress_deflate) -- DecodeForPrint to convert back. -- DecodeForPrint will remove prefixed and trailing control or space characters -- in the string before decode it. assert(LibDeflate:DecodeForPrint(printable_compressed) == compress_deflate) ``` -------------------------------- ### LibDeflate:CompressDeflate Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Compresses data using the raw deflate format. ```APIDOC ## LibDeflate:CompressDeflate(str, configs) ### Description Compresses the provided string using the raw deflate format. ### Parameters - **str** (string) - Required - The data to be compressed. - **configs** (table/nil) - Optional - Configuration table for compression control. Uses default if nil. ``` -------------------------------- ### LibDeflate:Adler32 Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Calculates the Adler-32 checksum of a given string. ```APIDOC ## LibDeflate:Adler32(str) ### Description Calculates the Adler-32 checksum of the input string as defined in RFC1950. ### Parameters - **str** (string) - Required - The input string to calculate the checksum for. ### Returns - (integer) - The Adler-32 checksum (0 <= value < 2^32). ``` -------------------------------- ### LibDeflate:DecompressDeflate Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Decompresses raw deflate compressed data. ```APIDOC ## LibDeflate:DecompressDeflate(str) ### Description Decompresses raw deflate compressed data and returns the decompressed string and the number of unprocessed bytes. ### Parameters - **str** (string) - The data to be decompressed. ### Returns - **string/nil** - The decompressed data if successful, otherwise nil. - **integer** - The number of unprocessed bytes in the input data. ``` -------------------------------- ### LibDeflate:DecodeForPrint Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibDeflate/docs/source/LibDeflate.lua.html Decodes a printable string produced by LibDeflate:EncodeForPrint, handling potential prefixed or trailing control characters. ```APIDOC ## LibDeflate:DecodeForPrint(str) ### Description Decodes a printable string. It removes prefixed and trailing control characters or spaces before decoding. ### Parameters - **str** (string) - The string to be decoded. ### Returns - **string/nil** - The decoded string if successful, or nil if the string contains invalid characters. ``` -------------------------------- ### LibSerialize:IsSerializableType Source: https://github.com/aaronv-t/autobiographer/blob/master/Libs/LibSerialize/README.md Checks if the provided values are of a serializable type. ```APIDOC ## LibSerialize:IsSerializableType(...) ### Description Checks if all provided values are of a serializable type. Note that tables are always considered serializable regardless of their contents. ### Parameters - **...** (any) - Required - A variable number of values to check. ### Returns - **result** (boolean) - True if all argument types are serializable. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.