10 using System.Runtime.InteropServices;
17 #region Internal types
27 #region ZStream structure
29 [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)]
40 [MarshalAs(UnmanagedType.LPStr)]
82 #region Exception classes
219 [DllImport(
"ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
222 [DllImport(
"ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
226 #region Private stuff
int bits(struct state *s, int need)
Encapsulates general information about the ZLib library
static string Version
Gets the version of ZLib as a string, e.g. "1.2.1"
int SizeOfULong
Gets the size of the unsigned long that was compiled into Zlib
static uint zlibCompileFlags()
Info()
Constructs an instance of the Info class.
static string zlibVersion()
int SizeOfOffset
Gets the size of the z_off_t type that was compiled into Zlib
bool HasDebugInfo
True if the library is compiled with debug info
int SizeOfUInt
Gets the size of the unsigned int that was compiled into Zlib
int SizeOfPointer
Gets the size of the pointers that were compiled into Zlib
static int bitSize(uint bits)
bool UsesAssemblyCode
True if the library is compiled with assembly optimizations
The exception that is thrown when an error occurs on the zlib dll
ZLibException(int errorCode, string msg)
Initializes a new instance of the ZLibException class with a specified error message and error code
ZLibException(int errorCode)
Initializes a new instance of the ZLibException class with a specified error code
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
Declares methods and properties that enables a running checksum to be calculated
void Update(byte[] data)
Updates the current checksum with an array of bytes
uint Value
Gets the current value of the checksum
void Update(string data, Encoding encoding)
Updates the current checksum with the data from a string, using a specific encoding
void Update(string data)
Updates the current checksum with the data from a string
void Reset()
Clears the current checksum to 0
void Update(byte[] data, int offset, int count)
Updates the current checksum with part of an array of bytes
Declares methods and events for implementing compressors/decompressors
void Add(byte[] data, int offset, int count)
Adds more data to the codec to be processed.
DataAvailableHandler DataAvailable
Occurs when more processed data are available.
void Add(byte[] data)
Adds more data to the codec to be processed.
uint Checksum
Gets the checksum of the data that has been added so far
void Finish()
Finishes up any pending data that needs to be processed and handled.
CompressLevel
Defines constants for the available compression levels in zlib
@ Best
The maximum compression rate available.
@ Default
The default compression level with a reasonable compromise between compression and speed
@ Fastest
The fastest available compression level.
delegate void DataAvailableHandler(byte[] data, int startIndex, int count)
Represents the method that will be called from a codec when new data are available.
FlushTypes
Defines constants for the various flush types used with zlib
static struct sockaddr static addrlen static backlog const void msg