Skip to content

Commit

Permalink
0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mgnsm committed Mar 3, 2024
1 parent b561560 commit 28fecda
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This software is provided 'as-is', without any express or implied warranty. In n
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
Portions Copyright (c) 2022-2024 Magnus Montin or Copyright (c) 1995-2024 Jean-loup Gailly and Mark Adler
Portions Copyright (c) 2022-2024 Magnus Montin or Copyright (c) 1995-2024 Jean-loup Gailly and Mark Adler.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
![Build Status](https://github.com/mgnsm/ZLibDotNet/actions/workflows/ci.yml/badge.svg)
[![NuGet Badge](https://img.shields.io/nuget/v/ZLibDotNet.svg)](https://www.nuget.org/packages/ZLibDotNet/)

A fully managed and [performant](tests/ZLibDotNet.Benchmarks) C#/.NET Standard 1.3 compatible implementation of the [zlib compression library](https://www.zlib.net/) which provides in-memory compression, decompression, and integrity checks of uncompressed data in the zlib ([RFC (Request for Comments) 1950](https://datatracker.ietf.org/doc/html/rfc1950)) and raw deflate ([RFC 1951](https://datatracker.ietf.org/doc/html/rfc1951)) data formats (but not the gzip or zip formats).
A fully managed, [performant](tests/ZLibDotNet.Benchmarks) and modern C# (.NET Standard 1.3 compatible) implementation of the [zlib compression library](https://www.zlib.net/) which provides in-memory compression, decompression, and integrity checks of uncompressed data in the zlib ([RFC (Request for Comments) 1950](https://datatracker.ietf.org/doc/html/rfc1950)) and raw deflate ([RFC 1951](https://datatracker.ietf.org/doc/html/rfc1951)) data formats (but not the gzip or zip formats).

## zlib support in .NET
If you simply want to compress or decompress data in the zlib format in a .NET application, there is a `ZLibStream` class for doing this in .NET 6 and later versions:
Expand Down Expand Up @@ -64,7 +64,7 @@ Debug.Assert(MemoryExtensions.SequenceEqual(inputData, uncomressedData));
```
Check out the [unit tests](https://github.com/mgnsm/ZLibDotNet/tree/main/tests/ZLibDotNet.UnitTests) for more examples.
### Implementation
`ZStream` has been named after the equivalent `z_stream` type in the ported library. It breaks the [CA1711](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1711) naming rule as it's not a `System.IO.Stream` but a `ref struct`.
`ZStream` has been named after the equivalent `z_stream` type in the ported library. It intentionally breaks the [CA1711](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1711) naming rule as it's not a `System.IO.Stream` but a `ref struct`.

`Input` is a `ReadOnlySpan<byte>` property that defines the input buffer of the data to be compressed or uncompressed. The optional `int` properties `NextIn` and `AvailableIn` can be used to specify a starting position in the buffer and the maximum number of bytes to consume from it respectively.

Expand Down
2 changes: 1 addition & 1 deletion src/ZLibDotNet/ZLibDotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<PropertyGroup>
<Title>ZLibDotNet</Title>
<Description>A fully managed and performant C#/.NET implementation of version 1.3.1 of the zlib compression library which provides in-memory compression, decompression, and integrity checks of uncompressed data.
<Description>A fully managed, performant and modern C#/.NET implementation of version 1.3.1 of the zlib compression library which provides in-memory compression, decompression, and integrity checks of uncompressed data.

Supports the zlib (RFC 1950) and raw deflate (RFC 1951) data formats but not the gzip or zip formats.

Expand Down

0 comments on commit 28fecda

Please sign in to comment.