## Preface
EFT has been reworking the `bsg.componentace.compression.libs.zlib` alot the past versions, including various enhancements and introduced bugs (zero-tail decompression infinite looping). This also includes working towards deprecating `SimpleZlib` and improving `ZOutputStream`'s performance.
While working on Haru, @waffle.lord and I have been reworking the zlib code to be much simpler. These changes are compatible with Aki.
## The issue
- The current code is complex to understand without experience with the zlib library in question
- `Zlib.IsCompressed` has a bug when operating on < 3 bytes. The third statement is reached and thus out of bounds.
## Why fix this
- Simplifying the code improves future readability.
- Using `ZOutputStream` enables usage of further performance improvements made to `ZOutputStream` by BSG.
- `Zlib.IsCompressed` will work again on `byte[2]` and below.
## Why was it like this in the first place?
At the time of writing this code, there was poor understanding of how the zlib library worked. The implementation was a best-guess from decompiled code.
## What's affected?
Only Zlib utility's internal code. No external libraries are affected.
Co-authored-by: Merijn Hendriks <merijn.d.hendriks@gmail.com>
Reviewed-on: SPT-AKI/Modules#43
Co-authored-by: Merijn Hendriks <senko-san@noreply.dev.sp-tarkov.com>
Co-committed-by: Merijn Hendriks <senko-san@noreply.dev.sp-tarkov.com>
- Implement the models/helpers required to send console messages to the server console
- Implement sending plugin errors on startup to the server console
- Remove an unused variable and incorrect comment from PluginErrorNotifierPatch
Example output:
![Example](https://i.imgur.com/c0XBYLm.png)
Depends on changes in SPT-AKI/Server#160
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#35
Reviewed-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com>
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>