War3Net.IO.Compression 6.0.1

dotnet add package War3Net.IO.Compression --version 6.0.1
                    
NuGet\Install-Package War3Net.IO.Compression -Version 6.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="War3Net.IO.Compression" Version="6.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="War3Net.IO.Compression" Version="6.0.1" />
                    
Directory.Packages.props
<PackageReference Include="War3Net.IO.Compression" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add War3Net.IO.Compression --version 6.0.1
                    
#r "nuget: War3Net.IO.Compression, 6.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package War3Net.IO.Compression@6.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=War3Net.IO.Compression&version=6.0.1
                    
Install as a Cake Addin
#tool nuget:?package=War3Net.IO.Compression&version=6.0.1
                    
Install as a Cake Tool

War3Net.IO.Compression

About

War3Net.IO.Compression is a .NET library providing compression and decompression algorithms used in MPQ (MoPaQ) archives. It is part of the War3Net modding library for Warcraft III.

Key features

  • Compress and decompress data using ZLib (DEFLATE)
  • Decompress PKLib (PKWARE) compressed data
  • Decompress Huffman encoded data
  • Decompress BZip2 compressed data
  • Decompress IMA ADPCM audio data (mono and stereo)

How to Use

Compress data with ZLib

using War3Net.IO.Compression;

// Compress a stream
using var inputStream = File.OpenRead("input.dat");
using var compressedStream = ZLibCompression.Compress(inputStream, (int)inputStream.Length, leaveOpen: false);

// Write compressed data to file
using var outputStream = File.Create("output.dat");
compressedStream.Position = 0;
compressedStream.CopyTo(outputStream);

Decompress data with ZLib

using War3Net.IO.Compression;

byte[] compressedData = GetCompressedData();
uint expectedLength = 1024; // Expected decompressed size

byte[] decompressedData = ZLibCompression.Decompress(compressedData, expectedLength);

Decompress PKLib data

using War3Net.IO.Compression;

byte[] compressedData = GetPKLibCompressedData();
uint expectedLength = 2048;

byte[] decompressedData = PKLibCompression.Decompress(compressedData, expectedLength);

Decompress Huffman encoded data

using War3Net.IO.Compression;

byte[] compressedData = GetHuffmanCompressedData();

byte[] decompressedData = HuffmanCoding.Decompress(compressedData);

Decompress IMA ADPCM audio

using War3Net.IO.Compression;

byte[] compressedAudio = GetADPCMCompressedAudio();
int channelCount = 2; // 1 for mono, 2 for stereo

byte[] decompressedAudio = AdpcmCompression.Decompress(compressedAudio, channelCount);

Main Types

The main types provided by this library are:

  • War3Net.IO.Compression.ZLibCompression - Compress and decompress using ZLib (DEFLATE)
  • War3Net.IO.Compression.PKLibCompression - Decompress PKLib (PKWARE) compressed data
  • War3Net.IO.Compression.HuffmanCoding - Decompress Huffman encoded data
  • War3Net.IO.Compression.BZip2Compression - Decompress BZip2 compressed data
  • War3Net.IO.Compression.AdpcmCompression - Decompress IMA ADPCM audio data

Feedback and contributing

War3Net.IO.Compression is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Disclaimer

This README was generated with the assistance of AI and may contain inaccuracies. Please verify the information and consult the source code for authoritative details.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on War3Net.IO.Compression:

Package Downloads
War3Net.IO.Mpq

Read and write MPQ archives.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.0.1 0 2/1/2026
6.0.0 188 1/25/2026
5.8.0 897 9/6/2025
5.6.1 7,959 1/7/2023
5.6.0 1,135 12/20/2022
5.5.5 3,025 11/13/2022
5.5.3 1,392 10/29/2022
5.5.2 1,230 10/25/2022
5.5.0 2,340 8/20/2022
5.4.5 1,640 5/27/2022
5.4.0 4,333 2/13/2022
5.1.0 4,082 2/14/2021
5.0.1 1,217 12/25/2020
5.0.0 900 12/14/2020
1.0.2 2,143 11/11/2020
1.0.1 1,724 10/27/2020
1.0.0 1,323 9/14/2020
1.0.0-preview2 3,594 4/13/2020
1.0.0-preview1 3,859 11/10/2019
0.1.0 2,154 10/15/2019