Skip to content

HasZipHeader Method ​

Definition ​

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

Overloads ​

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

bool HasZipHeader(byte[] bytes) ​

csharp
bool HasZipHeader(byte[] bytes)

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

bool HasZipHeader(Stream stream) ​

csharp
bool HasZipHeader(Stream stream)

Returns true if the stream starts with Zip file header bytes

Remarks ​

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

bool HasZipHeader(ReadOnlySpan<byte> bytes) ​

csharp
bool HasZipHeader(ReadOnlySpan<byte> bytes)

Returns true if the span starts with Zip file header bytes