XenoAtom.Interop.zlib
1.0.0-alpha.2
Prefix Reserved
dotnet add package XenoAtom.Interop.zlib --version 1.0.0-alpha.2
NuGet\Install-Package XenoAtom.Interop.zlib -Version 1.0.0-alpha.2
<PackageReference Include="XenoAtom.Interop.zlib" Version="1.0.0-alpha.2" />
paket add XenoAtom.Interop.zlib --version 1.0.0-alpha.2
#r "nuget: XenoAtom.Interop.zlib, 1.0.0-alpha.2"
// Install XenoAtom.Interop.zlib as a Cake Addin #addin nuget:?package=XenoAtom.Interop.zlib&version=1.0.0-alpha.2&prerelease // Install XenoAtom.Interop.zlib as a Cake Tool #tool nuget:?package=XenoAtom.Interop.zlib&version=1.0.0-alpha.2&prerelease
XenoAtom.Interop.zlib
This package provides a low-level and modern .NET P/Invoke wrapper around the zlib compression library.
♻️ XenoAtom.Interop
This package is part of the XenoAtom.Interop project.
zlib compression library. For more information, see zlib website.
💻 Usage
After installing the package, you can access the library through the static class XenoAtom.Interop.zlib
.
For more information, see the official documentation at https://zlib.net/manual.html.
Example of using this library in C#:
using static XenoAtom.Interop.zlib;
// Compress a buffer
var data = Encoding.UTF8.GetBytes("Hello, World!");
var compressedData = new byte[32];
var ret = compress(compressedData, out var compressedSize, data);
if (ret != Z_OK)
{
// ...
}
// Decompress a buffer
var decompressedData = new byte[32];
ret = uncompress(decompressedData, out var decompressedSize, compressedData);
if (ret != Z_OK)
{
// ...
}
📦 Compatible Native Binaries
This library does not provide C native binaries but only P/Invoke .NET bindings to zlib
1.3.1-r1
.
If the native library is already installed on your system, check the version installed. If you are using this library on Alpine Linux, see the compatible version in the Supported API section below. Other OS might require a different setup.
For convenience, you can install an existing NuGet package (outside of XenoAtom.Interop project) that is providing native binaries. The following packages were tested and are compatible with XenoAtom.Interop.zlib:
NuGet Package with Native Binaries | Version |
---|---|
elskom.zlib.redist.win | 1.2.13 |
elskom.zlib.redist.linux | 1.2.13 |
elskom.zlib.redist.osx | 1.2.13 |
📚 Supported API
This package is based on the following header version:
- zlib C include headers:
zlib-dev
- Version:
1.3.1-r1
- Distribution: AlpineLinux
v3.20
The following API were automatically generated from the C/C++ code:
- zlib.h:
adler32
,adler32_combine
,adler32_z
,compress
,compress2
,compressBound
,crc32
,crc32_combine
,crc32_combine_gen
,crc32_combine_op
,crc32_z
,deflate
,deflateBound
,deflateCopy
,deflateEnd
,deflateGetDictionary
,deflateInit2_
,deflateInit_
,deflateParams
,deflatePending
,deflatePrime
,deflateReset
,deflateSetDictionary
,deflateSetHeader
,deflateTune
,inflate
,inflateBack
,inflateBackEnd
,inflateBackInit_
,inflateCopy
,inflateEnd
,inflateGetDictionary
,inflateGetHeader
,inflateInit2_
,inflateInit_
,inflateMark
,inflatePrime
,inflateReset
,inflateReset2
,inflateSetDictionary
,inflateSync
,uncompress
,uncompress2
,zlibCompileFlags
,zlibVersion
🪪 License
This software is released under the BSD-2-Clause license.
🤗 Author
Alexandre Mutel aka xoofx.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0-alpha.2 | 35 | 7/17/2024 |
1.0.0-alpha.1 | 57 | 5/19/2024 |