#pragma once // QuickLZ level-1 decompression, used to inflate compressed command packets. // Clients send commands uncompressed, so only decompression is needed. // Ported from ts6-manager tslib/quicklz.ts (itself from TSLib QuickerLz.cs). #include #include #include namespace Echoion::Protocol { using Bytes = std::vector; using ByteView = std::span; uint32_t qlzDecompressedSize(ByteView data); uint32_t qlzCompressedSize(ByteView data); // Throws std::runtime_error on malformed input or unsupported level. Bytes qlzDecompress(ByteView data); } // namespace Echoion::Protocol