Skip to content

HasGZipHeader Method ​

Definition ​

  • Namespace: JASE.Extensions
  • Assembly: JASE.Compression.dll

Overloads ​

NameDescription
bool HasGZipHeader(byte[] bytes)Returns true if the byte array starts with GZip file header bytes
bool HasGZipHeader(Stream stream)Returns true if the stream starts with GZip file header bytes
bool HasGZipHeader(ReadOnlySpan<byte> bytes)Returns true if the span starts with GZip header bytes

bool HasGZipHeader(byte[] bytes) ​

csharp
bool HasGZipHeader(byte[] bytes)

Returns true if the byte array starts with GZip file header bytes

bool HasGZipHeader(Stream stream) ​

csharp
bool HasGZipHeader(Stream stream)

Returns true if the stream starts with GZip file header bytes

Remarks ​

If the stream is seekable, the original position is restored; otherwise the header bytes are consumed.

bool HasGZipHeader(ReadOnlySpan<byte> bytes) ​

csharp
bool HasGZipHeader(ReadOnlySpan<byte> bytes)

Returns true if the span starts with GZip header bytes