Zstd.NetFramework
2.0.3
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Zstd.NetFramework --version 2.0.3
NuGet\Install-Package Zstd.NetFramework -Version 2.0.3
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="Zstd.NetFramework" Version="2.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zstd.NetFramework" Version="2.0.3" />
<PackageReference Include="Zstd.NetFramework" />
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 Zstd.NetFramework --version 2.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Zstd.NetFramework, 2.0.3"
#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.
#addin nuget:?package=Zstd.NetFramework&version=2.0.3
#tool nuget:?package=Zstd.NetFramework&version=2.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Zstd.NetFramework
This is a Wrappers based on P/Invoke implementations.
Functions implemented by calling facebook/zstd(dev).
API
Zstd.Compress(byte[] src, int level)
Zstd.Decompress(byte[] src, int dstCapacity)
Zstd.CompressStream(Stream src, Stream dst, int level)
Zstd.DecompressStream(Stream src, Stream dst)
Zstd.CompressStream2SimpleArgs(Stream src, Stream dst, int level)
Zstd.DecompressStreamSimpleArgs(Stream src, Stream dst)
Demo
using CN.Lalaki.Zstd;
using System.IO;
using System;
// ...sample code
using (var cstream = File.OpenRead("path\\of\\example.zst"))
{
MemoryStream destream = new MemoryStream();
// Decompress Stream
Zstd.DecompressStream(cstream, destream);
var c2stream = new MemoryStream();
destream.Seek(0, SeekOrigin.Begin);
// Compress Stream
Zstd.CompressStream(destream, c2stream, 3);
// Decompress Byte Array
const int bufferSize = 1024 * 1024 * 20; // if 20MB, must be larger than original file size
var ddata = Zstd.Decompress(c2stream.ToArray(), bufferSize);
Console.WriteLine("Decompress Size: {0}", ddata.Length);
// Compress Byte Array
var cdata = Zstd.Compress(ddata, 3);
Console.WriteLine("Compress Size {0}", cdata.Length);
}
License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6.2
- 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.
This is a Wrappers based on P/Invoke implementations.