GBX.NET.ZLib 1.1.0
GBX.NET.ZLib
A zlib compression plugin for GBX.NET to allow de/serialization of compressed Gbx parts like ghost/entity data or lightmap cache. This official implementation uses managed Iconic.Zlib.Netstandard
.
The compression logic is split up from the read/write logic to separate dependencies better.
Compression has not been tested.
Usage
Additional package GBX.NET.LZO
is required in this example.
At the beginning of your program execution, you add the Gbx.ZLib = new ZLib();
to prepare the ZLib compression. It should be run only once.
using GBX.NET;
using GBX.NET.Engines.Game;
using GBX.NET.LZO;
using GBX.NET.ZLib; // Add this
Gbx.LZO = new Lzo();
Gbx.ZLib = new ZLib(); // Add this ONLY ONCE and before you start using Parse methods
var ghost = Gbx.ParseNode<CGameCtnGhost>("Path/To/My.Ghost.Gbx");
// SampleData will (likely) use ZLib decompression
foreach (var sample in ghost.SampleData.Samples)
{
Console.WriteLine(sample.Position);
}
You should not get the ZLib exception anymore when you attempt to get SampleData
.
License
GBX.NET.ZLib library is MIT Licensed.
If you use the LZO compression library, you must license your project under the GNU GPL v3.
No packages depend on GBX.NET.ZLib.
.NET 6.0
- GBX.NET (>= 2.0.8)
- Iconic.Zlib.Netstandard (>= 1.0.0)
.NET 8.0
- GBX.NET (>= 2.0.8)
- Iconic.Zlib.Netstandard (>= 1.0.0)
.NET Standard 2.0
- GBX.NET (>= 2.0.8)
- Iconic.Zlib.Netstandard (>= 1.0.0)
Version | Downloads | Last updated |
---|---|---|
1.1.0 | 24 | 09/29/2024 |